[JIRA] (JENKINS-58587) Not able to retrieve the short commit id from multiple repositories on windows slave node.

2019-07-21 Thread shub.avas...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Shubham Avasthi updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-58587  
 
 
  Not able to retrieve the short commit id from multiple repositories on windows slave node.   
 

  
 
 
 
 

 
Change By: 
 Shubham Avasthi  
 
 
Priority: 
 Minor Major  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.200743.1563736838000.17359.1563738420247%40Atlassian.JIRA.


[JIRA] (JENKINS-58587) Not able to retrieve the short commit id from multiple repositories on windows slave node.

2019-07-21 Thread shub.avas...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Shubham Avasthi created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-58587  
 
 
  Not able to retrieve the short commit id from multiple repositories on windows slave node.   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Mark Waite  
 
 
Components: 
 git-plugin  
 
 
Created: 
 2019-07-21 19:20  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Shubham Avasthi  
 

  
 
 
 
 

 
 I want the short commit id of all the git repositories on windows slave node. I have done the following in my Jenkinsfile :  checkout([$class: 'GitSCM', branches: [[name: "develop"]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'SubmoduleOption', disableSubmodules: true, parentCredentials: false, recursiveSubmodules: true, reference: '', trackingSubmodules: false], [$class: 'RelativeTargetDirectory', relativeTargetDir: '']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '***', url: "GITURL"]]]) {{}} checkout([$class: 'GitSCM', branches: [[name: 'master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'SubmoduleOption', disableSubmodules: true, parentCredentials: false, recursiveSubmodules: true, reference: '', trackingSubmodules: false], [$class: 'RelativeTargetDirectory', relativeTargetDir: 'XYZ']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '***', url: "GITURL1"]]]) So after the after first checkout GITURL repository ( branch - develop) is getting downloaded in the jenkins workspace under job name folder on windows slave node and after the second checkout,GITURL1 repository (branch - master) is getting downloaded inside the same job name folder under the folder - XYZ. I want to capture the short commit id for both the repositories. I have written the following command to capture the short commit id.  def SHORT_COMMIT_ID = bat (returnStdout: true, script: "@git log -n 1 --pretty=format:'%%h'").trim() echo 'Commit id ' + "$SHORT_COMMIT_ID" def SHORT_COMMIT_ID_XYZ = bat (returnStdout: true, script: "@git log -n 1 --pretty=format:'%%h' – XYZ").trim() echo 'XYZ Commit id ' + "$SHORT_COMMIT_ID_XYZ" for first commit id value