UPDATED: Improve the auto generated doc to explain what 'tidy' does:
ORIGINAL QUESTION:
So I got a Pipeline where I do an unshelve operation with the p4plugin.
The command looks like this:
p4unshelve( credential: 'CI_Creds', shelf: "${unshelve{color:#569cd6}}", workspace: staticSpec(charset: 'none', pinHost: false, name: 'ci_workspace'))
This works just as I would expect it to work.
But I can't seem to figure out a way to have an equivalent command using p4plugin for p4.exe revert -c default //...
I just want to be able to undo the unshelve command when the pipeline ends.
I tried using a regular batch command, I guess I could get that to work if I set up the environment correctly but this would also mean that the p4credentials would have to be passed to that batch command which I don't want.
Is there a solution for this?
Thanks in advance.
[JENKINS-72381] P4Plugin undo unshelve - Improve auto generated doc (explain tidy)
Description |
Original:
So I got a Pipeline where I do an unshelve operation with the p4plugin.
The command looks like this: {color:#cccccc}p4unshelve({color} {color:#cccccc} credential: {color}{color:#ce9178}'CI_Creds'{color}{color:#cccccc},{color} {color:#cccccc} shelf: {color}{color:#ce9178}"{color}{color:#569cd6}${{color}{color:#d4d4d4}unshelve{color}{color:#569cd6}}{color}{color:#ce9178}"{color}{color:#cccccc},{color} {color:#cccccc} workspace: staticSpec(charset: {color}{color:#ce9178}'none'{color}{color:#cccccc}, pinHost: {color}{color:#569cd6}false{color}{color:#cccccc}, name: {color}{color:#ce9178}'ci_workspace'{color}{color:#cccccc})){color} {color:#172b4d}This works just as I would expect it to work.{color} {color:#172b4d}But I can't seem to figure out a way to have an equivalent command using p4plugin for p4.exe revert -c default //...{color} {color:#172b4d}I just want to be able to undo the unshelve command when the pipeline ends.{color} {color:#172b4d}I tried using a regular batch command, I guess I could get that to work if I set up the environment correctly but this would also mean that the p4credentials would have to be passed to that batch command which I don't want.{color} {color:#172b4d}Is there a solution for this?{color} {color:#172b4d}Thanks in advance.{color} |
New:
So I got a Pipeline where I do an unshelve operation with the p4plugin.
The command looks like this: {code:java} p4unshelve( credential: 'CI_Creds', shelf: "${unshelve{color:#569cd6}}", workspace: staticSpec(charset: 'none', pinHost: false, name: 'ci_workspace')){code} {color:#172b4d}This works just as I would expect it to work.{color} {color:#172b4d}But I can't seem to figure out a way to have an equivalent command using p4plugin for p4.exe revert -c default //...{color} {color:#172b4d}I just want to be able to undo the unshelve command when the pipeline ends.{color} {color:#172b4d}I tried using a regular batch command, I guess I could get that to work if I set up the environment correctly but this would also mean that the p4credentials would have to be passed to that batch command which I don't want.{color} {color:#172b4d}Is there a solution for this?{color} {color:#172b4d}Thanks in advance.{color} |
Assignee | New: Karl Wirth [ p4karl ] |
Resolution | New: Not A Defect [ 7 ] | |
Status | Original: Open [ 1 ] | New: Closed [ 6 ] |
Resolution | Original: Not A Defect [ 7 ] | |
Status | Original: Closed [ 6 ] | New: Reopened [ 4 ] |
Attachment | New: image-2023-11-29-10-46-48-378.png [ 61627 ] |
Hi _dentist - You should be able to use the "Clean up Review actions:" mentioned here:
https://www.perforce.com/manuals/jenkins/Content/P4Jenkins/build-step-unshelve-snippet-generator.html?Highlight=revert
For example:
Please give that a try.