-
Notifications
You must be signed in to change notification settings - Fork 653
-
Hello We have sometimes the situation where a GitLab job needs to be tiggered when already a newer commit is made on that branch. This produces already a newer version number on that "old" job. Is there a way to that this job creates the same version again? Same happens when we re-run a certain build step. First RunRerun Job (Already new commits on that branch) |
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments · 7 replies
-
Hm. Can you see whether GitVersion performs repository normalization during the second run? Can you provide complete logs of both runs so we can see that it is indeed the same commit ID that is checked out, etc. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Sure: First Run (Latest Commit on Branch)
2nd Run (One New Commit on Branch)
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Since the history is different, the version generated by GitVersion will also be different. If you manage to checkout commit |
Beta Was this translation helpful? Give feedback.
All reactions
-
GitLab does it already right via GitVersion somehow automatically updates the current branch to latest commit and then calculates it. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Yeah, as you can see, GitVersion performs repository normalization:
You can try to pass the argument |
Beta Was this translation helpful? Give feedback.
All reactions
-
Yes, I've solved it by explicitly setting the -c parameter. But GitVersion advertising BuildServer support, so i think it should take up the parameter implicitly. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Normalization is done for a reason. Something is wonky with the repository for GitVersion to do it. But it is of course not supposed to change the |
Beta Was this translation helpful? Give feedback.
All reactions
-
Shall I file a bug for this? |
Beta Was this translation helpful? Give feedback.
All reactions
-
We should have a few issues related to normalization already. Does #2900 cover your use-case, for instance? |
Beta Was this translation helpful? Give feedback.
Yes, I've solved it by explicitly setting the -c parameter.
But GitVersion advertising BuildServer support, so i think it should take up the parameter implicitly.