-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
Jenkins 2.60.2
Pipeline: Multibranch 2.16
New description
People get very confused when presented with an option that is described in a Negative. As a result, when people see "Do not fetch tags [ ]" it is very easy to get confused and fail to conclude that this is means "Fetch tags [x]"
Consequently, people get confused as to how to fetch tags with Git Branch Source.
We should remove configuration options that present in a negative description. This issue will rename "Do not fetch tags" to "Fetch tags". The default will still have the same semantic value, i.e. if you add Advanced Clone Behaviours and change nothing, tags will be fetched, but it will make this more obvious to users.
Original description
The default behavior changed so that pipelines for all branches no longer fetch tags by default and there's no option to turn this back on. I just need to add an Advanced Clone Behaviours with Do not fetch tags deselected to turn fetching them back on:
Remainder of original description:
Our pipeline relies on the tags being there when it starts.
Expected:
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
Cloning the remote Git repository
Cloning repository git@github.com:...
> git init /var/lib/jenkins/workspace/... # timeout=10
Fetching upstream changes from git@github.com:...
> git --version # timeout=10
using GIT_ASKPASS to set credentials GitHub Source
> git fetch --tags --progress git@github.com:... +refs/heads/:refs/remotes/origin/**
> git config remote.origin.url git@github.com:... # timeout=10
> git config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10
> git config remote.origin.url git@github.com:... # timeout=10
Fetching upstream changes from git@github.com:...
using GIT_ASKPASS to set credentials GitHub Source
> git fetch --tags --progress git@github.com:... +refs/heads/:refs/remotes/origin/**
Checking out Revision 84cfb2d926a9304aa81e20ca60418d5c94313c5e (new-branch)
> git config core.sparsecheckout # timeout=10
> git checkout -f 84cfb2d926a9304aa81e20ca60418d5c94313c5e
Actual:
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
Cloning the remote Git repository
Cloning with configured refspecs honoured and without tags
Cloning repository git@github.com:...
> git init /var/lib/jenkins/workspace/... # timeout=10
Fetching upstream changes from git@github.com:...
> git --version # timeout=10
using GIT_ASKPASS to set credentials GitHub Source
> git fetch --no-tags --progress git@github.com:... +refs/heads/:refs/remotes/origin/**
> git config remote.origin.url git@github.com:... # timeout=10
> git config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10
> git config remote.origin.url git@github.com:... # timeout=10
Fetching without tags
Fetching upstream changes from git@github.com:...
using GIT_ASKPASS to set credentials GitHub Source
> git fetch --no-tags --progress git@github.com:... +refs/heads/:refs/remotes/origin/**
Checking out Revision 84cfb2d926a9304aa81e20ca60418d5c94313c5e (new-branch)
Commit message: "Something"
> git config core.sparsecheckout # timeout=10
> git checkout -f 84cfb2d926a9304aa81e20ca60418d5c94313c5e