-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
-
Jenkins 2.60.3 running on CentOS 7 (installed via yum)
Plugins:
- Bitbucket Branch Source Plugin 2.2.3
- Bitbucket Plugin 1.1.5
- Git Client plugin 2.5.0
- Git plugin 3.5.1
I have a Jenkins Bitbucket Team/Project job. Inside the Jenkinsfile in my repository I use "git describe" to get the current tag. After I updated to the latest Jenkins version (2.60.3) and updated several plugins, this fails because Jenkins doesn't fetch tags anymore.
This is what I had before the update (with Bitbucket Branch Source Plugin v2.1.2):
Branch event Checking out git https://bitbucket.org/xxxxxxx to read Jenkinsfile > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://bitbucket.org/xxxxx.git # timeout=10 Fetching upstream changes from https://bitbucket.org/xxxx.git > git --version # timeout=10 using GIT_ASKPASS to set credentials Admin user to clone bitbucket repositories > git fetch --tags --progress https://bitbucket.org/xxxxx.git +refs/heads/master
This is what I have now (with Bitbucket Branch Source Plugin v2.2.3):
Branch event Checking out git https://bitbucket.org/xxxx.git into /var/lib/jenkins/jobs/xxxx/jobs/xxx/branches/master/workspace@script to read Jenkinsfile Cloning the remote Git repository Cloning with configured refspecs honoured and without tags Cloning repository https://bitbucket.org/xxxxx.git > git init /var/lib/jenkins/jobs/xxx/jobs/xxxx/branches/master/workspace@script # timeout=10 Fetching upstream changes from https://bitbucket.org/xxx.git > git --version # timeout=10 using GIT_ASKPASS to set credentials Admin user to clone bitbucket repositories > git fetch --no-tags --progress https://bitbucket.org/xxxx.git +refs/heads/master:refs/remotes/origin/master
The default behaviour changed. It's not fetching tags anymore (uses --no-tags). I couldn't find any settings to force jenkins to fetch tags. In Bitbucket Team/Project settings, you can setup "Advanced clone behaviours":
- Shallow clone
- ...
- Do not fetch tags
"Do not fetch tags" is not selected. So I'd think that it should fetch tags by default...
I have a simple pipeline project with a Jenkinsfile and it still fetches tags. So I think this is a Bitbucket Branch Source plugin issue.