Build not Calculated well on AzureDevops #3723
-
Describe the bug Somethings I noticed are
Expected BehaviorVersion number is always calculated correctly Actual Behavior
Steps to Reproduce
--> Your EnvironmentAzure Devops with self managed agent. Gitversion runs in docker container
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Hi there. Could you please provide steps to reproduce and investigate in more detail in which circumstance this error happens? For me it makes no sense that on main branch sometimes (nondeterministic) a different branch were detected. The only reason I can think of is that you have multiple builds on the same time with the working directory. I'm using git-version for years with azure devops and have never seen this behavior. Thank you very much. |
Beta Was this translation helpful? Give feedback.
-
@HHobeck Issue still happens from time to time, although I still lack the steps to reproduce. |
Beta Was this translation helpful? Give feedback.
-
So after a-lot of investigations I concluded the following My Initial code
Conclusions
Fix/ Workaround
Code: Workaround
|
Beta Was this translation helpful? Give feedback.
-
Having had an issue only yesterday with a server build behaving differently to local - can I suggest explicitly setting your Working Folder on the script task: |
Beta Was this translation helpful? Give feedback.
-
Thank you very much sharing your findings in such detail and give us some workarounds. Everything you have documented seems to be build agent specific except #2921. Do you have any other ideas to make git version more robust having this in mind? Anyway I would say to move this issue to the FAQ section. |
Beta Was this translation helpful? Give feedback.
-
@HHobeck If my investigations are correct, it would make sense that gitversion automatically uses the origin branch and not depends on the local one. This is the only thing which comes to mind for the time being. However I am still confused as to why this issue started happening - ive been using gitversion for many years. My guess it Azure updated something in the checkout step and it would b hidden somewhere deep in their documentation. |
Beta Was this translation helpful? Give feedback.
So after a-lot of investigations I concluded the following
My Initial code
Conclusions
clean:true
does not work as expected. Not all the files are really cleaned + orphaned files still remain on the agentworkssp…