Prerequisites
GitVersion package
GitVersion.Portable
GitVersion version
6.5.1
Operating system
Windows, Linux
What are you seeing?
When running a tag pipeline on GitLab CI with a tag that has multiple environments (detached git state), GitVersion fails to detect a version as soon as the main branch has additional commits.
Note the refs/pipelines and refs/environments.
INFO [26-02-16 13:21:43:08] Fetching remote refs to see if there is a pull request ref
INFO [26-02-16 13:21:44:39] Remote Refs:
refs/heads/main
refs/environments/production-test-vqp4b9/deployments/1
refs/environments/production-test-vqp4b9/deployments/2
refs/environments/production-test-vqp4b9/deployments/3
refs/environments/production-test-vqp4b9/deployments/4
refs/heads/main
refs/heads/master
refs/pipelines/2328609100
refs/tags/v1.0.0
refs/tags/v1.0.1
refs/tags/v1.0.2
refs/tags/v1.0.3
INFO [26-02-16 13:21:44:40] -< End: Normalizing git directory for branch '' (Took: 1,363.64ms) >-
WARN [26-02-16 13:21:44:40] An error occurred:
Found more than one remote tip from remote '<redacted>' pointing at the commit 'f857f5f9fdc952c7a38ff96197c97fcfb3ac03c3'. Unable to determine which one to use (refs/environments/production-test-vqp4b9/deployments/1, refs/environments/production-test-vqp4b9/deployments/2, refs/environments/production-test-vqp4b9/deployments/3, refs/tags/v1.0.2).
What is expected?
GitVersion should be able to detect the correct tag.
For tag detection it might be required that a single tag is more important than all other refs if multiple are found or that certain refs can be excluded in the config.
Steps to Reproduce
stages: [build]
test:
stage: build
script:
- echo "This is a test job."
environment: production/test
- commit, create tag 1.0.1, push tag & push branch
- rerun tag pipeline multiple times
- create a change, commit, create tag 1.0.2, push tag & push branch
- checkout tag 1.0.1
- run gitversion:
GITLAB_CI=true gitversion /output buildserver
RepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).
Prerequisites
GitVersion package
GitVersion.Portable
GitVersion version
6.5.1
Operating system
Windows, Linux
What are you seeing?
When running a tag pipeline on GitLab CI with a tag that has multiple environments (detached git state), GitVersion fails to detect a version as soon as the main branch has additional commits.
Note the refs/pipelines and refs/environments.
What is expected?
GitVersion should be able to detect the correct tag.
For tag detection it might be required that a single tag is more important than all other refs if multiple are found or that certain refs can be excluded in the config.
Steps to Reproduce
GITLAB_CI=true gitversion /output buildserverRepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).