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

checkout scm information no longer injected into environment in pipeline job

    Details

    • Similar Issues:

      Description

      We updated our Jenkins from version 2.138.1 to 2.138.2. Since then after a checkout scm step inside a pipeline step the variables SVN_REVISION and SVN_URL are no longer injected into the environment.

        Attachments

          Issue Links

            Activity

            Hide
            duemir Denys Digtiar added a comment -

            That is by design. The Pipeline can have multiple independent checkout steps which would override one another if they were all to expose to the same environment. Instead, the checkout steps returns an object that should contain all the environment variables that are exposed by SCM.

            def svnInfo = checkout scm
            echo "SVN_REVISION=${svnInfo.SVN_REVISION}"
            
            Show
            duemir Denys Digtiar added a comment - That is by design. The Pipeline can have multiple independent checkout steps which would override one another if they were all to expose to the same environment. Instead, the checkout steps returns an object that should contain all the environment variables that are exposed by SCM. def svnInfo = checkout scm echo "SVN_REVISION=${svnInfo.SVN_REVISION}"

              People

              • Assignee:
                Unassigned
                Reporter:
                a_zen a_zen
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: