[JIRA] (JENKINS-41794) Groovy pipeline: Git command didn't checkout the last commit

2017-02-24 Thread stephen.alan.conno...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Stephen Connolly commented on  JENKINS-41794  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Groovy pipeline: Git command didn't checkout the last commit   
 

  
 
 
 
 

 
 why can you not use checkout scm?  
 

  
 
 
 
 

 
 
 

 
 
 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-41794) Groovy pipeline: Git command didn't checkout the last commit

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


 
 
 
 

 
 
 

 
   
 Mikhail Chinkov commented on  JENKINS-41794  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Groovy pipeline: Git command didn't checkout the last commit   
 

  
 
 
 
 

 
 Probably there might be my misunderstanding about how Git works and how does it depend on current environment. Thanks for the suggestion, hopefully I'll debug this issue in the future.  
 

  
 
 
 
 

 
 
 

 
 
 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-41794) Groovy pipeline: Git command didn't checkout the last commit

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


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-41794  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Groovy pipeline: Git command didn't checkout the last commit   
 

  
 
 
 
 

 
 Sorry the easy solution wasn't the real solution. Good luck finding the difference between those two scenarios. You might try some other isolation techniques like: 
 
Copy the problem job to another name, see if the problem remains across the copy. If it does, then that hints the problem is connected to the job definition. If it doesn't, then the problem may be connected to something in the original job, or to the state of the repository 
Run the problem job multiple times, see if the problem persists. I think your description suggests that you've already tried that, and it did not persist 
 The goal is to find a set of repeatable steps that can be used to show the problem so that you (or someone else) could implement a test to show the failure, then implement a fix which is confirmed by passing the test.  
 

  
 
 
 
 

 
 
 

 
 
 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-41794) Groovy pipeline: Git command didn't checkout the last commit

2017-02-07 Thread michael.chin...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mikhail Chinkov commented on  JENKINS-41794  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Groovy pipeline: Git command didn't checkout the last commit   
 

  
 
 
 
 

 
 Thanks for the reply, but I have 2 notes for this issue. 1. We don't have and didn't have at all "origin/master" branch. 2. I just compared the Git output of 2 builds - with commit delivery problem and without one. And the command sequence was the same, one by one, though results were really different.So, there is still a little confusion, why 2 equal processes provide different results.  
 

  
 
 
 
 

 
 
 

 
 
 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-41794) Groovy pipeline: Git command didn't checkout the last commit

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


 
 
 
 

 
 
 

 
   
 Mark Waite edited a comment on  JENKINS-41794  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Groovy pipeline: Git command didn't checkout the last commit   
 

  
 
 
 
 

 
 There is a surprising line in the git output where it says:{code}> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10{code}That might indicate that someone created a branch named "origin/master" in your repository.  If so, that tends to confuse the git plugin.   Most users don't need a branch named "origin/master", so if one exists, you should probably delete it.Other than that, I don't have suggestions to offer.  
 

  
 
 
 
 

 
 
 

 
 
 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-41794) Groovy pipeline: Git command didn't checkout the last commit

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


 
 
 
 

 
 
 

 
   
 Mark Waite edited a comment on  JENKINS-41794  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Groovy pipeline: Git command didn't checkout the last commit   
 

  
 
 
 
 

 
 There is a surprising line in the git output where it says:{ quote code }> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10{ quote code }That might indicate that someone created a branch named "origin/master" in your repository.  If so, that tends to confuse 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-41794) Groovy pipeline: Git command didn't checkout the last commit

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


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-41794  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Groovy pipeline: Git command didn't checkout the last commit   
 

  
 
 
 
 

 
 There is a surprising line in the git output where it says: 

> git rev-parse refs/remotes/origin/origin/master^ 

Unknown macro: {commit} 
 
 # timeout=10
 That might indicate that someone created a branch named "origin/master" in your repository. If so, that tends to confuse 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-41794) Groovy pipeline: Git command didn't checkout the last commit

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


 
 
 
 

 
 
 

 
   
 Mark Waite assigned an issue to Unassigned  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41794  
 
 
  Groovy pipeline: Git command didn't checkout the last commit   
 

  
 
 
 
 

 
Change By: 
 Mark Waite  
 
 
Assignee: 
 Mark Waite  
 

  
 
 
 
 

 
 
 

 
 
 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-41794) Groovy pipeline: Git command didn't checkout the last commit

2017-02-07 Thread michael.chin...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mikhail Chinkov updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41794  
 
 
  Groovy pipeline: Git command didn't checkout the last commit   
 

  
 
 
 
 

 
Change By: 
 Mikhail Chinkov  
 

  
 
 
 
 

 
 The problem: once, when I've run in Groovy pipeline [multibranch mode] git command to fetch the latest codebase to the slave workspace. The command:{code :groovy }git([url: 'https://github.com/myorg/myrepo.git', branch: "${env.BRANCH_NAME}", credentialsId: "${env.CREDENTIALS_ID}"]){code}Command output:{code:shell} > git init /home/jenkins/workspace/myjob_master-U53VEN73XGVKUQMHQMUNYUI3M2EMMZ6IAKD7LIC32FLG7MMBHHIQ # timeout=10 > git --version # timeout=10 > git fetch --tags --progress https://github.com/myorg/myrepot.git +refs/heads/*:refs/remotes/origin/* > git config remote.origin.url https://github.com/myorg/myrepo.git # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url https://github.com/myorg/myrepo.git # timeout=10  > git fetch --tags --progress https://github.com/myorg/myrepo.git +refs/heads/*:refs/remotes/origin/* > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 > git config core.sparsecheckout # timeout=10 > git checkout -f 950c0037ee3d2b2803380baa5c0d7812a47dd6b9 > git branch -a -v --no-abbrev # timeout=10 > git checkout -b master 950c0037ee3d2b2803380baa5c0d7812a47dd6b9{code}Although it has to checkout the latest version - it didn't. And there was no error in the build workflow. So, I've got the obsolete repo state, built to Docker image and finally got some sort of troubleshooting because the problem was not so obvious. When I connected to the troubled slave and check the git - the commit wasn't there. I just made a git pull into the workspace, rebuilt the Docker image and got the latest application version.I tried to reproduce the possible bug, but I couldn't. I rebuilt the pipeline at the clean workspace, later trying to roll out the commit with changes. And commit came! So, I still confused what kind of bug it was.So, please, help me to understand where is the problem might be. If you have to know additional details - please, write, what kind of.Thanks in advance.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
   

[JIRA] (JENKINS-41794) Groovy pipeline: Git command didn't checkout the last commit

2017-02-07 Thread michael.chin...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mikhail Chinkov updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41794  
 
 
  Groovy pipeline: Git command didn't checkout the last commit   
 

  
 
 
 
 

 
Change By: 
 Mikhail Chinkov  
 

  
 
 
 
 

 
 The problem: once, when I've run in Groovy pipeline [multibranch mode] git command to fetch the latest codebase to the slave workspace. The command:{code}git([url: 'https://github.com/myorg/myrepo.git', branch: "${env.BRANCH_NAME}", credentialsId: "${env.CREDENTIALS_ID}"]){code}Command output:{code :shell } > git init /home/jenkins/workspace/myjob_master-U53VEN73XGVKUQMHQMUNYUI3M2EMMZ6IAKD7LIC32FLG7MMBHHIQ # timeout=10 > git --version # timeout=10 > git fetch --tags --progress https://github.com/myorg/myrepot.git +refs/heads/*:refs/remotes/origin/* > git config remote.origin.url https://github.com/myorg/myrepo.git # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url https://github.com/myorg/myrepo.git # timeout=10  > git fetch --tags --progress https://github.com/myorg/myrepo.git +refs/heads/*:refs/remotes/origin/* > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 > git config core.sparsecheckout # timeout=10 > git checkout -f 950c0037ee3d2b2803380baa5c0d7812a47dd6b9 > git branch -a -v --no-abbrev # timeout=10 > git checkout -b master 950c0037ee3d2b2803380baa5c0d7812a47dd6b9{code}Although it has to checkout the latest version - it didn't. And there was no error in the build workflow. So, I've got the obsolete repo state, built to Docker image and finally got some sort of troubleshooting because the problem was not so obvious. When I connected to the troubled slave and check the git - the commit wasn't there. I just made a git pull into the workspace, rebuilt the Docker image and got the latest application version.I tried to reproduce the possible bug, but I couldn't. I rebuilt the pipeline at the clean workspace, later trying to roll out the commit with changes. And commit came! So, I still confused what kind of bug it was.So, please, help me to understand where is the problem might be. If you have to know additional details - please, write, what kind of.Thanks in advance.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
  

[JIRA] (JENKINS-41794) Groovy pipeline: Git command didn't checkout the last commit

2017-02-07 Thread michael.chin...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mikhail Chinkov created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41794  
 
 
  Groovy pipeline: Git command didn't checkout the last commit   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Mark Waite  
 
 
Attachments: 
 VPk8wS4Pnqw.jpg  
 
 
Components: 
 git-client-plugin, groovy-plugin, multi-branch-project-plugin, pipeline-stage-step-plugin  
 
 
Created: 
 2017/Feb/07 9:18 AM  
 
 
Environment: 
 Operating System: Ubuntu 16.04 Xenial  Kernel: 4.4.0-53-generic  Java: OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13)  Jenkins version: 2.32.1  Jenkins plugins versions: at the attached screenshot  Jenkins run: directly  How you installed Jenkins: apt-get from official repo  Slave nodes: 1 affected node on the same OS/kernel and Java, connected by SSH, built from EC2 plugin.  
 
 
Labels: 
 git pipeline groovy multibranch  
 
 
Priority: 
  Trivial  
 
 
Reporter: 
 Mikhail Chinkov  
 

  
 
 
 
 

 
 The problem: once, when I've run in Groovy pipeline [multibranch mode] git command to fetch the latest codebase to the slave workspace. The command: 

 

Unable to find source-code formatter for language: groovy. Available languages are: actionscript, html, java, _javascript_, none, sql,