GIT_STRATEGY=clone doesn't clone tags
Summary
When setting GIT_STRATEGY: clone, I expect the repository to be in the same state as if I'm using the command git clone <repository>, which clone also tags. But here the tags are missing.
The documentation doesn't specify how git tags are handle.
Steps to reproduce
Here is a minimal repository to reproduce the behavior on gitlab.com: repository.
.gitlab-ci.yml
test_tag:
variables:
GIT_STRATEGY: clone
script:
- git tag
- git fetch --tags
- git tag
Actual behavior
The first git tag command doesn't show any tag.
Expected behavior
The two git tag command should return the same output as GIT_STRATEGY is set to clone
Relevant logs and/or screenshots
job log
Running with gitlab-runner 12.8.0-rc1 (12a489c4)
on docker-auto-scale 0277ea0f
Using Docker executor with image ruby:2.5 ...
00:35
Pulling docker image ruby:2.5 ...
Using docker image sha256:2a14e515b3071e903c110bc60285cfb8ed3b3fe4602ab8838ed3dca20e831628 for ruby:2.5 ...
Running on runner-0277ea0f-project-17099666-concurrent-0 via runner-0277ea0f-srm-1582542222-e6fa48b8...
00:05
$ eval "$CI_PRE_CLONE_SCRIPT"
00:02
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/nick.laurenson/test-gitlab-ci/.git/
Created fresh repository.
From https://gitlab.com/nick.laurenson/test-gitlab-ci
* [new ref] refs/pipelines/120481067 -> refs/pipelines/120481067
* [new branch] master -> origin/master
Checking out 38f77651 as master...
Skipping Git submodules setup
$ git tag
00:01
$ git fetch --tags
From https://gitlab.com/nick.laurenson/test-gitlab-ci
* [new tag] v0.0 -> v0.0
$ git tag
v0.0
Job succeeded
Environment description
Could reproduce the behaviour on gitlab.com.
Possible fixes
A workaround would be run to run git fetch --tags manually.