Jenkins – the Jenkins variable containing the Perforce changelist that triggered the build

continuous integrationJenkinsperforce

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?

Best Answer

It's called P4_CHANGELIST.

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

Related Topic