Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37584

P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin
    • None
    • jenkins 2.7.2 LTS
      p4-plgin 1.3.8
      jdk 1.8 (sun)
      OS : redhat 7.2

      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)

          [JENKINS-37584] P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

          squalou jenkins created issue -
          p v made changes -
          Flagged New: Impediment [ 10003 ]
          Karl Wirth made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Karl Wirth made changes -
          Assignee New: Karl Wirth [ p4karl ]
          Paul Allen made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Paul Allen made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          Paul Allen made changes -
          Link New: This issue is blocked by JENKINS-38976 [ JENKINS-38976 ]
          Paul Allen made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          squalou jenkins made changes -
          Description Original: 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/pipeline-plugin/blob/master/README.md

          especially : {quote}No access to Environment $\{VAR\} variables{quote}

          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)


          New: 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 : {quote}No access to Environment $\{VAR\} variables{quote}

          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)


          squalou jenkins made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          Staffan Forsell made changes -
          Link New: This issue is related to JENKINS-40885 [ JENKINS-40885 ]

            p4karl Karl Wirth
            squalou squalou jenkins
            Votes:
            7 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:
              Resolved: