[JIRA] (JENKINS-59922) Publish should use p4 reconcile -t to detect filetype changes

139 views
Skip to first unread message

kwirth@perforce.com (JIRA)

unread,
Oct 24, 2019, 10:29:05 AM10/24/19
to jenkinsc...@googlegroups.com
Karl Wirth created an issue
 
Jenkins / Improvement JENKINS-59922
Publish should use p4 reconcile -t to detect filetype changes
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: p4-plugin
Created: 2019-10-24 14:28
Environment: P4-Plugin 1.10.5
Priority: Major Major
Reporter: Karl Wirth

When a file changes from being a symlink to a text file (using the same name) P4jenkins wont detect it properly because 'p4 reconcile' is not using the '-t' flag. This causes problems later in the job:

P4 Task: reconcile files to changelist.
... p4 revert -k //jenkins-Windows10-SymlinkEdgeCases_WindowsOnly-9/...
 +... p4 sync -k //jenkins-Windows10-SymlinkEdgeCases_WindowsOnly-9/...
 +... p4 reconcile -e -a -f //jenkins-Windows10-SymlinkEdgeCases_WindowsOnly-9/.___
 +... p4 opened -Cjenkins-Windows10-SymlinkEdgeCases_WindowsOnly-9 //jenkins-Win___
 +duration: (24ms)

P4 Task: publish files to Perforce.
... p4 change -i
 +... p4 change -o 2047
 +... pending change: 2047
... p4 reopen -c2047 //jenkins-Windows10-SymlinkEdgeCases_WindowsOnly-9/...
 +... p4 change -o 2047
 +... p4 opened -Cjenkins-Windows10-SymlinkEdgeCases_WindowsOnly-9 //jenkins-Win___
 +... ... edit //depot/SymlinkEdgeCases/Windows/SymLinks/windows_file_symlink
... submitting files
... p4 describe -s 2047
 +... p4 fixes -c2047
 +... p4 submit -i
 +
Unable to publish workspace: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
Client side operation(s) failed.  Command aborted.

Build step 'Perforce: Publish assets' marked build as failure
Finished: FAILURE

When you check the workspace 'windows_file_symlink' is opened for edit as type 'symlink'.

 

Reproduction Steps:

(1) Using a windows client create a target file ('a_target').

(2) Create a symlink ('windows_file_symlink') to the target using 'mklink'.

(3) Submit both files to the depot.

(4) Create a Jenkins job that syncs both  files and then publishes changes from that workspace. Include a build step that is a batch file that replaces the symlink with the file contents. For example:

 

dir /s
attrib -r windows_file_symlink
del windows_file_symlink
copy a_target windows_file_symlink

(7) Execute the Jenkins job.

 

 

 

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

kwirth@perforce.com (JIRA)

unread,
May 1, 2020, 9:34:05 AM5/1/20
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
Change By: Karl Wirth
Labels: P4_A P4_VERIFY
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

kwirth@perforce.com (JIRA)

unread,
May 1, 2020, 9:35:02 AM5/1/20
to jenkinsc...@googlegroups.com
Karl Wirth commented on Improvement JENKINS-59922
 
Re: Publish should use p4 reconcile -t to detect filetype changes

Updating to highlight this. Please discuss at next sprint planning meeting.

Reply all
Reply to author
Forward
0 new messages