|
||||||||
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
We've been doing precommit/shelved builds for a good while in a build step prior to the main job. Parameterized build with the p4 shelve number as input. I run "Run buildstep before SCM":
#!/bin/bash -ex
p4 revert ...
Then before the main build task I run this (this is on a clean and new workspace everytime btw):
if [ $SHELVE != 0 ]; then
p4 unshelve -s $SHELVE
if [ $? -ne 0 ]; then
echo "Unshelving change $SHELVE hasn't worked, aborting"
exit 1
fi
else
echo "Input a value for the P4 shelve command or else you're just building the latest nightly code, which is covered in another job"
exit 1
fi