git tags not fetched

14 views
Skip to first unread message

aham...@anchorfree.com

unread,
Aug 21, 2017, 5:27:12 PM8/21/17
to Jenkins Users
We have a GitHub organization with repos detected and built by github-branch-folder.

I note the following from https://wiki.jenkins.io/display/JENKINS/Git+Plugin for "Version 3.4.0 (July 17, 2017)"
  • Because each branch job in a multibranch project will only ever build the one specific branch, the default behaviour for a Git Branch Source is now to use a minimal refspec corresponding to just the required branch. Tags will not be checked out by default. If you have a multibranch project that requires the full set of ref-specs (for example, you might have a pipeline that will use some analysis tool on the diff with some other branch) you can restore the previous behaviour by adding the "Advanced Clone Behaviours". Note: In some cases you may also need to add the "Specify ref specs" behaviour.
I click into my_organization->Configure->Projects under GitHub Organization and enable "Advanced clone behaviors". Instead of an option to _enable_ fetching of tags, there is "Do not fetch tags". It is not enabled, however My builds still do not fetch tags. I tried enabling it in the hopes that it was just a developer forgetting to update the description, but no luck:

Running on jenkins-agent-8GB-0c2185cb-8ff2-402c-8e9e-3e49df68e557 in /jenkins/workspace/rfree_docker-jenkins_master-76M6OWBGMGMW63CGIV6UX7DGQI3CXBAL6A5BM6Z7HKBA3SXZTZBQ
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/anchorfree/docker-jenkins.git # timeout=10
Fetching without tags
Fetching upstream changes from https://github.com/anchorfree/docker-jenkins.git
 > git --version # timeout=10
using GIT_ASKPASS to set credentials Jenkins Global Pipeline Libraries scan credentials
 > git fetch --no-tags --progress https://github.com/anchorfree/docker-jenkins.git +refs/heads/master:refs/remotes/origin/master
Checking out Revision 41cfac69a0c19ef98ff70ff1bba0e571c81bd5c2 (master)
Commit message: "upgrade to official Jenkins 2.60.3"

How do I get Jenkins to fetch tags?

aham...@anchorfree.com

unread,
Aug 21, 2017, 5:30:40 PM8/21/17
to Jenkins Users
I'm guessing this is a regression. Created https://issues.jenkins-ci.org/browse/JENKINS-46331

Reply all
Reply to author
Forward
0 new messages