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

Pipeline Script from SCM (Perforce) set's environment variables wrong for the p4sync that run's during pipeline

    XMLWordPrintable

Details

    Description

      We are trying to use pipelinescript from SCM feature of the p4 plugin, but are running into an issue with the wrong environment variables being set in the pipeline while the pipeline script is actually executing.

      The setup that we have is a workspace / stream that syncs specific scripts and than run's that specific pipeline script.

      Inside the pipeline script we run p4sync to sync to a DIFFERENT workspace/stream as the guidelines say we should be using different workspaces, however the  value of "${env.P4_CHANGELIST}" that we access inside the script body of a step is reporting the changelist from the initial sync from the declarative workspace and not the sync step that just ran during the p4sync

       

      How do we get the changelist that was ran from the last p4sync and is it possible to fix the plugin to update the environment variable to match the last p4sync

       

      Attachments

        Activity

          grujicbr Branislav Grujic created issue -
          grujicbr Branislav Grujic made changes -
          Field Original Value New Value
          Priority Minor [ 4 ] Blocker [ 1 ]
          p4karl Karl Wirth made changes -
          Labels perforce pipeline pipeline-p4 plugin P4_SUPPORT perforce pipeline pipeline-p4 plugin

          People

            Unassigned Unassigned
            grujicbr Branislav Grujic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: