Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Jenkins variable containing the Perforce changelist that triggered the build?

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?

like image 457
jbemt48 Avatar asked Aug 10 '12 19:08

jbemt48


People also ask

What are the built in variables in Jenkins?

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'.

Does Jenkins work with Perforce?

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.


1 Answers

It's called P4_CHANGELIST.

See the "Advanced Configuration" section of the plugin documentation for more details.

like image 114
gareth_bowles Avatar answered Oct 02 '22 14:10

gareth_bowles