-
Bug
-
Resolution: Fixed
-
Trivial
-
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.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.
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:
git([url: 'https://github.com/myorg/myrepo.git', branch: "${env.BRANCH_NAME}", credentialsId: "${env.CREDENTIALS_ID}"])
Command output:
> 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
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.