[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2019-10-22 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite closed an issue as Duplicate  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-35230  
 
 
  The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
Change By: 
 Mark Waite  
 
 
Status: 
 Resolved Closed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.170923.1464679794000.14028.1571794263711%40Atlassian.JIRA.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2018-03-26 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Jared Miller, the wiki is not the preferred location for Pipeline documentation. Refer to the Pipeline: SCM Step page for an example using the environment variables as a map returned from the `checkout` step. There is a Jenkins Minute video that describes it as well. You can also read about it (briefly) in the Pipeline: SCM Step plugin page. If you'd like to add it to the Git plugin Wiki, you're welcome to do that as well.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2018-03-26 Thread jtmil...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jared Miller commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 This is not at all obvious if you just glance over: https://wiki.jenkins.io/display/JENKINS/Git+Plugin You'd never expect that to access those ENV variables you have to capture the output of checkout. Or am I mistaken?   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-16 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Sorry, while github-branch-source does record the source branch name for forked pull requests, this is not defined in scm-api and so not exposed as an environment variable by branch-api.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-16 Thread patth...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Patrick Thiel commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
  i've tried this and it returns the PR number in github eg. PR-2424, not the actual branch name.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-16 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 

we need the GIT_BRANCH name to checkout sibling branches in other repositories
 Use BRANCH_NAME.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-16 Thread patth...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Patrick Thiel commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Jesse Glick yes, but that only returns the commit. In my use case, we need the GIT_BRANCH name to checkout sibling branches in other repositories. I don't think we can checkout to a local branch because that option is not available when the source is set to Github.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-16 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 JENKINS-26100 has always tracked this well-known limitation. Parsing git rev-parse HEAD is the typical workaround for Git.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-15 Thread patth...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Patrick Thiel edited a comment on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 [~jglick] there looks to be a lot of potentially useful information in this ticket. The linked ticket that this was closed out and marked as a duplicate of has not been updated since November 2016, and was created in December 2014. Further, it doesn't appear to highlight the current issue with environment variables in Jenkins pipelines returning null. Can you please elucidate on  the  these  actions  taken ?   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-15 Thread patth...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Patrick Thiel commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Jesse Glick there looks to be a lot of potentially useful information in this ticket. The linked ticket that this was closed out and marked as a duplicate of has not been updated since November 2016, and was created in December 2014. Further, it doesn't appear to highlight the current issue with environment variables in Jenkins pipelines returning null.  Can you please elucidate on the actions taken?   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-15 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick resolved as Duplicate  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-35230  
 
 
  The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
Change By: 
 Jesse Glick  
 
 
Status: 
 Open Resolved  
 
 
Resolution: 
 Duplicate  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-12 Thread mko...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mike Kobit commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Little bit more research into this: 
 
Run is an Actionable, so doing something like final BuildData buildData = run.getAction(BuildData.class); works to obtain that Action data. 
GitSCM has a method buildEnvVars that seems to compute most of the environment variables. Maybe this can be abstracted out to be usable from both points? 
 So, a very basic implementation that I got working locally with the Bitbucket Branch Source Plugin could look like: 

 

package jenkins.plugins.git;

import static hudson.Util.fixEmpty;

import com.google.common.collect.Iterables;
import hudson.EnvVars;
import hudson.Extension;
import hudson.model.EnvironmentContributor;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.plugins.git.Branch;
import hudson.plugins.git.GitSCM;
import hudson.plugins.git.Revision;
import hudson.plugins.git.util.BuildData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;

import javax.annotation.Nonnull;

@Extension
public class GitContributor extends EnvironmentContributor {

  private static final Logger LOG = LoggerFactory.getLogger(GitContributor.class);

  @Override
  public void buildEnvironmentFor(@Nonnull final Run run,
  @Nonnull final EnvVars envs,
  @Nonnull final TaskListener listener)
  throws IOException, InterruptedException {

final BuildData buildData = run.getAction(BuildData.class);

// This is all essentially copy pasted from GtiSCM
if (buildData != null) {
  final Revision rev = buildData.getLastBuiltRevision();
  if (rev!=null) {
Branch branch = Iterables.getFirst(rev.getBranches(), null);
if (branch!=null && branch.getName()!=null) {
  String remoteBranchName  = branch.getName();
  if(remoteBranchName.startsWith("refs/remotes/")) {
//Restore expected previous behaviour
remoteBranchName  = remoteBranchName.substring("refs/remotes/".length());
  }
  envs.put(GitSCM.GIT_BRANCH, remoteBranchName);

}

String sha1 = fixEmpty(rev.getSha1String());
if (sha1 != null && !sha1.isEmpty()) {
  envs.put(GitSCM.GIT_COMMIT, sha1);
}
  }
}
  }
}
 

  
 

  
 
 
 
 

 
 
 

 
 
  

[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-12 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Unfortunately, I don't have any great ideas to offer, though I suspect that Jesse Glick has a reference implementation in the mercurial plugin. You might look at buildEnvVarsFromActionable. Jesse has tried to keep the mercurial plugin as a really good SCM reference implementation. I suspect that its implementation of exporting environment variables to pipeline jobs is also a good reference implementation.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-12 Thread mko...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mike Kobit commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 I was making an attempt at fixing this today by trying to follow along with the implementation at https://github.com/jenkinsci/branch-api-plugin/blob/master/src/main/java/jenkins/branch/BranchNameContributor.java - my knowledge gaps of the Jenkins source code make it difficult to figure out how to actually implement this. So, any help from other core plugin authors or maintainers would be highly appreciated. 
 
EnvironmentContributor seems like the right class to extend from here 
EnvironmentContributor.buildEnvironmentFor is available for both Job and Run 
BranchNameContributor gets the BranchProjectFactory of the parent job and uses it to check if this 
BranchNameContributor uses types like ContributorMetadataAction and other actions to get metadata 
How do I obtain the Git metadata associated with a Job or Run (it seems like it should be associated with a certain Run? 
Will reflection be needed to get the workflow execution and revision info from the Run? 
  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You re

[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-10 Thread pw...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Patrick Wolf updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-35230  
 
 
  The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
Change By: 
 Patrick Wolf  
 
 
Component/s: 
 workflow-scm-step-plugin  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-10 Thread pw...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Patrick Wolf updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-35230  
 
 
  The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
Change By: 
 Patrick Wolf  
 
 
Labels: 
 pipeline  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-08 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite edited a comment on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 No one is currently working on fixing this in the git plugin  currently, as far as I can tell .  I'm currently evaluating the Git LFS support pull requests.  Once that is complete, I'll  likely work on fixing submodule bugs and then will  consider which pull requests I should evaluate  next  after that .  I doubt I will spend time coding this implementation for many months.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-08 Thread patth...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Patrick Thiel commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Chiming in here.. This being broken has presented us with some major challenges, as we have a multi-repository setup where we'll have sibling PR's with matching branch names in our other repositories. The lack of env.GIT_BRANCH in pipelines has presented major difficulties in checking out those sibling PR's.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-03 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Orest Stetsiak, it is usually preferred that a bug report be limited to a single topic. In the case of this bug, it is specific to environment variables in a pipeline. If there is an issue with environment variables in freestyle jobs, that is a very different topic. If you're able to duplicate the issue, please submit a different bug report. I'm not aware of cases where GIT_COMMIT is not set for the environment of a freestyle project. Refer to the environment variables description for more information on environment variables and the contexts where they are available.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-03 Thread axe...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Orest Stetsiak commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Hi feng yu Mark Waite Torben Knerr and others ! Was your build already triggered by SCM event ? or all builds were only "manual triggered" ? I not using pipeline plugin, but freestyle project so I configured new project, already ran few build manually, and see actually no env variables line GIT_*, like described there:  https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin so, I guess, after first "SCM triggered" build, this EnvVariables - GIT_* should become available in EnvVariable my suggestion are: 1) to configure job on "SCM event" 2) add shell step with "echo $ {GIT_COMMIT} " 3) check output 4) push to repo (should trigger job) 5) check output 6) let us know Regards!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-02-03 Thread axe...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Orest Stetsiak edited a comment on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Hi [~abcfy2] [~markewaite] [~tknerr] and others !Was your build already triggered by SCM event ? or all builds were only "manual triggered" ?I not using pipeline plugin, but freestyle projectso I configured new project, already ran few build manually, and see actually no env variables line GIT_*, like described there: https://wiki.jenkins-ci.org/display/JENKINS/Git+Pluginso, I guess, after first "SCM triggered" build, this EnvVariables - GIT_* should become available in EnvVariablemy suggestion are:1) to configure job on "SCM event"2) add shell step with "echo $ { GIT_COMMIT } "3) check output4) push to repo (should trigger job)5) check output6) let us knowRegards!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-01-24 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 No one is currently working on fixing this in the git plugin currently, as far as I can tell. I'm currently evaluating the Git LFS support pull requests. Once that is complete, I'll consider which pull requests I should evaluate next. I doubt I will spend time coding this implementation for many months.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2017-01-24 Thread m...@tknerr.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Torben Knerr commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Anyone still working on really fixing this in the Git plugin?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-11-03 Thread trami...@natomatech.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Ramirez commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 clausfod: I hadn't found that approach yet so thanks for pointing me in that direction. I'm a recent transplant from the world of .NET and TFS so everything is new.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-11-03 Thread claus...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 clausfod commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Thomas Ramirez: Can't you use the api ? For example use /api/json?depth=1 find lastBuild and go further with this url -> /api/json there you find your data, if not use lastBuild until you find a build with commits.. jubel han: Can't you use the api ? For example use /api/json?depth=1 find lastSuccessfulBuild and go further with this url -> /api/json there you find your data  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-11-03 Thread trami...@natomatech.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Ramirez commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 clausfod: Thanks but I thought that returned the equivalent of GIT_COMMIT. My goal is to identify if certain files were updated since the last build. I know how to get the list of files between two commit points but I'm missing the starting commit point.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-11-03 Thread claus...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 clausfod commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Thomas Ramirez: Try this (maybe you need to enable "checkout to local branch") 

 

String gitCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim()
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-11-03 Thread trami...@natomatech.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Ramirez commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 I'm in a similar situation as jubel but could get by with GIT_PREVIOUS_COMMIT or a workaround.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-10-28 Thread hanbingxi...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 jubel han commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Any news to know when is this gonna be solve ? currently it is blocking me to get the variable of `GIT_PREVIOUS_SUCCESSFUL_COMMIT`, or any of workaround can be achieve it, Thanks!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-09-22 Thread ffittsc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Florian Fittschen commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Peter Leibiger Thanks! That's sufficient as a workaround until the issue is fixed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-09-22 Thread p.leibi...@codecraft.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Peter Leibiger commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Florian Fittschen Try to enable "checkout to local branch"  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-09-22 Thread ffittsc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Florian Fittschen commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 clausfod git rev-parse --abbrev-ref HEAD always returns HEAD for me instead of master... I guess this happens, because Jenkins always builds with a detached HEAD as described here: JENKINS-6856  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-09-21 Thread claus...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 clausfod edited a comment on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 [~paralin]: You can use env.BRANCH_NAME (Multi branch projects) or use this:{code}def branchName if(isUnix()){  branchName = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim()  }    else{branchName = bat(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim()  }{code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-09-21 Thread claus...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 clausfod edited a comment on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 [~paralin]: You can use env.BRANCH_NAME (Multi branch projects) or use this:{code} String def  branchName  if(isUnix()){  branchName  = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() {code }   else{  You can of course also use the branchName =  bat  instead of sh (returnStdout: true, script: 'git rev  -  and to be generel use the isUnix parse --abbrev-ref HEAD') . . trim()  }{code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-09-21 Thread claus...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 clausfod edited a comment on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 [~paralin]: You can use env.BRANCH_NAME (Multi branch projects) or use this:{code}String branchName = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim(){code} You can of course also use the bat instead of sh - and to be generel use the isUnix..  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-09-21 Thread claus...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 clausfod edited a comment on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 [~paralin]: You can use env.BRANCH_NAME (Multi branch projects) or use this:{code}String  gitCommit  branchName  = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim(){code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-09-21 Thread claus...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 clausfod commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Christian Stewart: You can use env.BRANCH_NAME (Multi branch projects) or use this: 

 

String gitCommit = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim()
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-09-20 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Sorry, no progress yet. It will arrive in the git plugin eventually, since I want access to those environment variables as part of my testing of the git plugin (and git client plugin).  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-09-20 Thread christ...@paral.in (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Christian Stewart commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Were there any updates on this? How can I determine, for example, the branch Jenkins built?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-07-28 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Someone needs to research the way to publish environment variables to a pipeline, then propose a pull request (with tests) to the git plugin. Richard Boyer suggested that the timestamp plugin knows how to provide environment variables to a pipeline, so I suggested that someone might consider that as a path to an eventual pull request.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-07-28 Thread mko...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mike Kobit commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Looks like this may be related to https://issues.jenkins-ci.org/browse/JENKINS-36436 What needs to happen to make these available in pipeline? I would hope to not have to run a sh every time I want to get the commit that triggered this pipeline.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-07-22 Thread pub...@richardboyer.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Richard Boyer commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Its not possible to blend them without multiple inheritance. The timestamp plugin works via an EnvironmentContributor which is distinct from SCM: https://github.com/jenkinsci/build-timestamp-plugin/blob/master/src/main/java/com/orctom/jenkins/plugin/buildtimestamp/BuildTimestampEnvironmentContributor.java I'm a Jenkins plugin newbie, so this is pushing the limits of what I can reason about effectively. Especially with this new pipeline layer on top.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-07-22 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 Richard Boyer nice find that the build timestamp plugin has the necessary technique in it. Are you able to review the source code of the build timestamper plugin and submit a comparable pull request for the git plugin?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-07-22 Thread pub...@richardboyer.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Richard Boyer edited a comment on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 This is affecting me as well.  Does the git plugin need to be subtly adjusted to export these critical pieces of data in a new way to be accessible to serial pipeline steps?In a custom plugin triggered after the Git step, the following are the only {{EnvVars}} available:{noformat}BUILD_DISPLAY_NAME=#9BUILD_ID=9BUILD_NUMBER=9BUILD_TAG=jenkins-pipetest-9BUILD_TIMESTAMP=2016-07-22 11:30:39 CDTBUILD_URL=http://blah:8080/job/pipetest/9/CLASSPATH=HUDSON_HOME=/var/jenkins_homeHUDSON_SERVER_COOKIE=blahHUDSON_URL=http://blah:8080/JENKINS_HOME=/var/jenkins_homeJENKINS_SERVER_COOKIE=blahJENKINS_URL=http://blah:8080/JOB_BASE_NAME=pipetestJOB_NAME=pipetestJOB_URL=http://blah:8080/job/pipetest/{noformat} Since {{BUILD_TIMESTAMP}} is available, that implies the [https://wiki.jenkins-ci.org/display/JENKINS/Build+Timestamp+Plugin] plugin is able to inject env vars into the pipeline just fine, so it is possible.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-07-22 Thread pub...@richardboyer.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Richard Boyer edited a comment on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 This is affecting me as well.  Does the git plugin need to be subtly adjusted to export these critical pieces of data in a new way to be accessible to serial pipeline steps? In a custom plugin triggered after the Git step, the following are the only {{EnvVars}} available:{noformat}BUILD_DISPLAY_NAME=#9BUILD_ID=9BUILD_NUMBER=9BUILD_TAG=jenkins-pipetest-9BUILD_TIMESTAMP=2016-07-22 11:30:39 CDTBUILD_URL=http://blah:8080/job/pipetest/9/CLASSPATH=HUDSON_HOME=/var/jenkins_homeHUDSON_SERVER_COOKIE=blahHUDSON_URL=http://blah:8080/JENKINS_HOME=/var/jenkins_homeJENKINS_SERVER_COOKIE=blahJENKINS_URL=http://blah:8080/JOB_BASE_NAME=pipetestJOB_NAME=pipetestJOB_URL=http://blah:8080/job/pipetest/{noformat}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-35230) The environment variables of git plugin not working in pipeline script.

2016-07-22 Thread pub...@richardboyer.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Richard Boyer commented on  JENKINS-35230  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The environment variables of git plugin not working in pipeline script.   
 

  
 
 
 
 

 
 This is affecting me as well. Does the git plugin need to be subtly adjusted to export these critical pieces of data in a new way to be accessible to serial pipeline steps?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.