[JIRA] (JENKINS-60809) No GIT_* environment entries set during pipeline run

11 views
Skip to first unread message

prettymama@centrum.cz (JIRA)

unread,
Jan 17, 2020, 12:02:07 PM1/17/20
to jenkinsc...@googlegroups.com
Martin Tee created an issue
 
Jenkins / Bug JENKINS-60809
No GIT_* environment entries set during pipeline run
Issue Type: Bug Bug
Assignee: Kristy Hughes
Components: atlassian-bitbucket-server-integration-plugin
Created: 2020-01-17 17:01
Environment: atlassian-bitbucket-server-integration-1.0.3, jenkins-2.204.1, git-4.0.0, git-client-3.0.0
Priority: Major Major
Reporter: Martin Tee

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 ommited and not overridden and the default implementation takes place causing all environment entries generated by Git plugin to be missing.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

prettymama@centrum.cz (JIRA)

unread,
Jan 17, 2020, 12:03:07 PM1/17/20
to jenkinsc...@googlegroups.com
Martin Tee updated an issue
Change By: Martin Tee
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 ommited and not overridden and the default implementation takes place causing all environment entries generated by Git plugin to be missing.

prettymama@centrum.cz (JIRA)

unread,
Jan 18, 2020, 11:47:03 AM1/18/20
to jenkinsc...@googlegroups.com
Martin Tee updated an issue
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 ommited omitted and not overridden and the default implementation takes place causing all environment entries generated by Git plugin to be missing.

mhenschke@atlassian.com (JIRA)

unread,
Feb 3, 2020, 5:52:07 PM2/3/20
to jenkinsc...@googlegroups.com
Martin Henschke started work on Bug JENKINS-60809
 
Change By: Martin Henschke
Status: Open In Progress

mhenschke@atlassian.com (JIRA)

unread,
Feb 3, 2020, 5:52:07 PM2/3/20
to jenkinsc...@googlegroups.com
Martin Henschke assigned an issue to Martin Henschke
Change By: Martin Henschke
Assignee: Kristy Hughes Martin Henschke

mhenschke@atlassian.com (JIRA)

unread,
Feb 4, 2020, 4:04:05 PM2/4/20
to jenkinsc...@googlegroups.com
Change By: Martin Henschke
Status: In Progress Fixed but Unreleased
Resolution: Fixed
Released As: 1.0.5

mhenschke@atlassian.com (JIRA)

unread,
Feb 27, 2020, 11:48:06 PM2/27/20
to jenkinsc...@googlegroups.com
Change By: Martin Henschke
Status: Fixed but Unreleased Closed
Released As: 1. 0 1 . 5 0
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages