This is at least the second time I'm facing this issue. When i updated core Jenkins from 2.47 to 2.58 and now from 2.58 to 2.71. I cannot upgrade git plugin beyond 3.3.0.
BTW, what is the difference between git client plugin and git plugin? Do I need both? Is one for the traditional Jenkins jobs and the other for declarative pipelines or something?
Our repos are hosted in bitbucket cloud. After upgrading the git plugin, during a typical checkout, it hangs for a moment and continues but the pipeline fails because nothing got checked out. The workspace is empty. Once I downgrade the plugin back to 3.3.0, its fine.
The block of code checking out from git:
def create_env(IP_ADDRESSES){
git url: 'g...@bitbucket.org:company/scripts.git', branch: 'master'
sh (script: "./create_test_env.sh ${IP_ADDRESSES} ", returnStdout: false)
}
Error or failed checkout behaviour. The pipeline continues without complaint that checkout did not happen and fails in the very end when it cannot find some scripts.
[Pipeline] git
07-30-2017-15:05 > git rev-parse --is-inside-work-tree # timeout=10
07-30-2017-15:05 Fetching changes from the remote Git repository
07-30-2017-15:05 > git config remote.origin.url g...@bitbucket.org:company/scripts.git # timeout=10
07-30-2017-15:05 Fetching upstream changes from g...@bitbucket.org:company/scripts.git
07-30-2017-15:05 > git --version # timeout=10
07-30-2017-15:05 > git fetch --tags --progress g...@bitbucket.org:company/scripts.git +refs/heads/*:refs/remotes/origin/*
07-30-2017-15:05 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
07-30-2017-15:05 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
07-30-2017-15:05 Checking out Revision c4ae02523570f7c1b9bbf5fe85aa864d8b299c9a (refs/remotes/origin/master)
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // node
[Pipeline] }
After downgrading plugin version
[Pipeline] {
[Pipeline] git
07-31-2017-03:00 > git rev-parse --is-inside-work-tree # timeout=10
07-31-2017-03:00 Fetching changes from the remote Git repository
07-31-2017-03:00 > git config remote.origin.url g...@bitbucket.org:company/scripts.git # timeout=10
07-31-2017-03:00 Fetching upstream changes from g...@bitbucket.org:company/scripts.git
07-31-2017-03:00 > git --version # timeout=10
07-31-2017-03:00 > git fetch --tags --progress g...@bitbucket.org:company/scripts.git +refs/heads/*:refs/remotes/origin/*
07-31-2017-03:00 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
07-31-2017-03:00 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
07-31-2017-03:00 Checking out Revision c4ae02523570f7c1b9bbf5fe85aa864d8b299c9a (refs/remotes/origin/master)
07-31-2017-03:00 > git config core.sparsecheckout # timeout=10
07-31-2017-03:00 > git checkout -f c4ae02523570f7c1b9bbf5fe85aa864d8b299c9a
07-31-2017-03:00 > git branch -a -v --no-abbrev # timeout=10
07-31-2017-03:00 > git branch -D master # timeout=10
07-31-2017-03:00 > git checkout -b master c4ae02523570f7c1b9bbf5fe85aa864d8b299c9a
07-31-2017-03:00 > git rev-list c4ae02523570f7c1b9bbf5fe85aa864d8b299c9a # timeout=10
[Pipeline] stash
07-31-2017-03:00 Stashed 3 file(s)
[Pipeline] wrap
[Pipeline] {