Jenkins P4 (Perforce) Plugin exposed variables

859 views
Skip to first unread message

BeckyY

unread,
Jul 21, 2015, 6:49:38 PM7/21/15
to Jenkins Users
Question is about the P4 plugin by Perforce, not the Perforce plugin by a third party.
I didn't see in the documentation any info about exposed variables.   In particular, I need to know the changelist # that the plugin selects to build against.   I created a simple project in Jenkins, configured perforce for it. I see from the build log (console output) that it got the latest changelist.  But within my build scripts I need to use that changelist number as a variable.   Anyone know what variables the P4 plugin provides for build scripts?

Daniel Beck

unread,
Jul 21, 2015, 7:45:27 PM7/21/15
to jenkins...@googlegroups.com
Probably easiest to find out what environment variables are defined with a shell or batch build step that executed 'env' or 'set' respectively.

On 22.07.2015, at 00:49, BeckyY <rebe...@amdocs.com> wrote:

> Question is about the P4 plugin by Perforce, not the Perforce plugin by a third party.
> I didn't see in the documentation any info about exposed variables. In particular, I need to know the changelist # that the plugin selects to build against. I created a simple project in Jenkins, configured perforce for it. I see from the build log (console output) that it got the latest changelist. But within my build scripts I need to use that changelist number as a variable. Anyone know what variables the P4 plugin provides for build scripts?
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/82072428-0072-4d80-ad7e-5f234a7aa62e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

BeckyY

unread,
Jul 21, 2015, 8:50:12 PM7/21/15
to Jenkins Users
Thank you, Daniel!    Yes, it was as simple as that!   P4_CHANGELIST is an environment variable containing the latest changelist for the path provided. 
Reply all
Reply to author
Forward
0 new messages