Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
jenkins 2.7.2 LTS
p4-plgin 1.3.8
jdk 1.8 (sun)
OS : redhat 7.2
Description
I'm using p4 plugin for several months in freestyle jobs, and I'm moving to 'pipelines' implementation (workflow if you like)
According to this documentation, there are some known limitations :
https://github.com/jenkinsci/p4-plugin/blob/master/SETUP.md
especially :
No access to Environment ${VAR} variables
On the other hand, one line below is written :
Exposed Variables :
- P4_CHANGELIST - current changelist (valid for this to be blank when there are no changes).
Within my pipelines, what I see is that 'P4_CHANGELIST' is not available after a call to p4sync.
Is it expected ?
If so, how do I retrieve the changelist at which the sync is done ? (in order to propagate it to further steps and stages in the pipeline)
Attachments
Issue Links
- depends on
-
JENKINS-26100 SCM steps should return revision state
-
- Resolved
-
- is blocked by
-
JENKINS-38976 P4_TICKET not exposed for .Groovy scripts
-
- Closed
-
- is related to
-
JENKINS-40885 Environment variables are not exposed in pipeline script
-
- Closed
-
Thank you for letting me know about the URL (https://jenkins.io/doc/pipeline/steps/p4/). Jenkins created this based on the code, but I am not sure how they update it? I agree it is confusing to read, I normally use the 'Pipeline Syntax' snippet generator and help bubbles to workout what options are available. The older depotPath vs source should be backwards compatible.
For example 3 ways to define a stream on p4sync: