Skip to content

Not possible to get version on detached HEAD (GitLab Runner) #1523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
WebDucer opened this issue Nov 7, 2018 · 1 comment
Closed

Not possible to get version on detached HEAD (GitLab Runner) #1523

WebDucer opened this issue Nov 7, 2018 · 1 comment
Labels

Comments

@WebDucer
Copy link

WebDucer commented Nov 7, 2018

Hello.

We use GitLab CI and GitVersion (within CAKE build). Most of the time it works great. Today we got the following error, that Gitversion can not determine the version.

As I can see, Gitversion has found the branch, that have the detached commit, but not use the information for getting the version.

We use version 3.6.5 of GitVersion at this time.

PS C:\BuildAgents\gitlab\builds\f4aded2c\1\Application> .\tools\GitVersion.CommandLine.3.6.5\tools\GitVersion.exe
INFO [11/07/18 14:02:11:35] Working directory: C:\BuildAgents\gitlab\builds\f4aded2c\1\Application
INFO [11/07/18 14:02:11:36] IsDynamicGitRepository: False
INFO [11/07/18 14:02:11:37] Returning Project Root from DotGitDirectory: C:\BuildAgents\gitlab\builds\f4aded2c\1\Application\.git - C:\BuildAgents\gitlab\builds\f4aded2c\1\Application
INFO [11/07/18 14:02:11:37] Running on Windows.
INFO [11/07/18 14:02:11:37] IsDynamicGitRepository: False
INFO [11/07/18 14:02:11:37] Returning Project Root from DotGitDirectory: C:\BuildAgents\gitlab\builds\f4aded2c\1\Application\.git - C:\BuildAgents\gitlab\builds\f4aded2c\1\Application
INFO [11/07/18 14:02:11:37] Project root is: C:\BuildAgents\gitlab\builds\f4aded2c\1\Application
INFO [11/07/18 14:02:11:37] DotGit directory is: C:\BuildAgents\gitlab\builds\f4aded2c\1\Application\.git
INFO [11/07/18 14:02:11:38] IsDynamicGitRepository: False
INFO [11/07/18 14:02:11:38] Returning Project Root from DotGitDirectory: C:\BuildAgents\gitlab\builds\f4aded2c\1\Application\.git - C:\BuildAgents\gitlab\builds\f4aded2c\1\Application
INFO [11/07/18 14:02:11:41] Begin: Loading version variables from disk cache
  INFO [11/07/18 14:02:11:41] Cache file C:\BuildAgents\gitlab\builds\f4aded2c\1\Application\.git\gitversion_cache\5BF
E8887B2617702013BD35B66F434BCFFA1F7F3.yml not found.
INFO [11/07/18 14:02:11:41] End: Loading version variables from disk cache (Took: 1.00ms)
INFO [11/07/18 14:02:11:41] IsDynamicGitRepository: False
INFO [11/07/18 14:02:11:41] Returning Project Root from DotGitDirectory: C:\BuildAgents\gitlab\builds\f4aded2c\1\Application\.git - C:\BuildAgents\gitlab\builds\f4aded2c\1\Application
INFO [11/07/18 14:02:11:48] Using latest commit on specified branch
INFO [11/07/18 14:02:11:49] Begin: Getting branches containing the commit '63c5ff1ab9c2e8283d21bf136db5832662a4499b'.
  INFO [11/07/18 14:02:11:49] Trying to find direct branches.
  INFO [11/07/18 14:02:11:50] No direct branches found, searching through tracked branches.
...
  INFO [11/07/18 14:02:11:61] Searching for commits reachable from 'develop'.
  INFO [11/07/18 14:02:11:66] The branch 'develop' has no matching commits.
...
  INFO [11/07/18 14:02:12:74] Searching for commits reachable from 'HOTFIX/LieferungVerschiebenFibuFirmaKopieren'.
  INFO [11/07/18 14:02:12:74] The branch 'HOTFIX/LieferungVerschiebenFibuFirmaKopieren' has a matching commit.
...
  INFO [11/07/18 14:02:13:14] Searching for commits reachable from 'origin/hotfix/LieferungVerschiebenFibuFirmaKopieren'.
  INFO [11/07/18 14:02:13:14] The branch 'origin/hotfix/LieferungVerschiebenFibuFirmaKopieren' has a matching commit.
INFO [11/07/18 14:02:13:14] End: Getting branches containing the commit '63c5ff1ab9c2e8283d21bf136db5832662a4499b'. (Too
k: 1,649.22ms)
INFO [11/07/18 14:02:13:15] Running against branch: (no branch) (63c5ff1ab9c2e8283d21bf136db5832662a4499b)
WARN [11/07/18 14:02:13:16] An error occurred:
It looks like the branch being examined is a detached Head pointing to commit '63c5ff1'. Without a proper branch name GitVersion cannot determine the build version.
PS C:\BuildAgents\gitlab\builds\f4aded2c\1\Application>
@stale
Copy link

stale bot commented Jun 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 29, 2019
@stale stale bot closed this as completed Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant