-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Not A Defect
-
Component/s: p4-plugin
-
Labels:None
-
Environment:Jenkins 1.6.16
P4 1.2.3
-
Similar Issues:
Test case:
- Freestyle job
- * configured P4 SCM
- * Build step: batchfile command to p4 edit a file in the configured workspace
- * Post build action Perforce: Publish Assets using the same P4 config as the checkout, set to use the Shelve Change option.
Ancillary details: P4 config was set to use a Static workspace, and job was configured to use a custom workspace directory which matched the Static workspace client root.
Looking at the log for the Shelve step, it looks like it's doing quite the opposite of what I desire:
- p4 revert -k
- p4 sync -k
- p4 reconcile -f
- p4 opened
I want:
- p4 change -i
- p4 reopen -c
- p4 shelve -c
- p4 revert (optional)
In English: I simply want to shelve the files that were explicitly p4 edit/add'ed during the build. Currently, the Shelve post-build step wants to automatically collect and shelve every single file system delta generated in the workspace during the build - I positively do not want that, as it will catch generated intermediate and local settings files, which I would then have to filter out with another mechanism. Also, the p4 reconcile step currently used is untenable in a large workspace, as it can take a very long time to run.
[Footnote: I am curious as to why the Shelve step uses reconcile behavior - this seems like an obscure specific use case compared to build steps being p4-aware.]
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Not A Defect [ 7 ] |
Workflow | JNJira [ 163638 ] | JNJira + In-Review [ 208855 ] |
The shelve step was intended to gather up build results (assets) and shelve them for review.
The shelve publish step should use a different workspace from the populate step. The view for this workspace should be very narrow (a Virtual stream, if using streams). Typically the view should be one or two files, limiting the files it will run the reconcile over.
Files that are already versioned in Perforce (but modified by the build) should have the '+w' bit set (allowing modification, without the 'p4 edit' command). Then included in the scope of narrow view for the publish workspace.