I have a Jenkins job set to poll Perforce for changes and build when a changelist is submitted.
I'd like to deploy the build artifacts to a folder which contains the changelist as part of the path - e.g. D:\JenkinsBuilds\$JOB_NAME\$PERFORCE_CHANGELIST\
What is the Jenkins variable containing the Perforce changelist number that triggered the build?
The default value is jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER} and will not appear in the generated snippet, however if you change this to jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}-libs you will see a new attribute in the snippet format: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}-libs'.
P4 Plugin for JenkinsYou can use the plugin to run builds using Perforce Streams or shelves. And you can create a workspace automatically, or use an existing workspace template. To boost performance, sync Helix Core depots in parallel using Jenkinsfile syntax.
It's called P4_CHANGELIST.
See the "Advanced Configuration" section of the plugin documentation for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With