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

No GIT_* environment entries set during pipeline run

    XMLWordPrintable

Details

    • 1.1.0

    Description

      Environment entries like GIT_COMMIT, GIT_BRANCH, etc. are null when using this integration.

      pipeline {
      agent any

      stages {
      stage('stage') {
      steps {
      echo "Value is: ${env.GIT_COMMIT}"
      }
      }
      }
      }

      will output Value is: null

      com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCM delegates a lot of calls to hudson.plugins.git.GitSCM, however method buildEnvironment(Run<?, ?> build, Map<String, String> env) is omitted and not overridden and the default implementation takes place causing all environment entries generated by Git plugin to be missing.

      Attachments

        Activity

          There are no comments yet on this issue.

          People

            mhenschke_atlassian Martin Henschke
            tomis Martin Tee
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: