MSBuild task fails in AzDO pipeline docker build, but not locally #4123
Unanswered
sanghel-orbyta
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Please help me understand a problem I'm having.
I have a solution with multiple projects:
In project 3 GitVersion.MsBuild is used like so:
There is no GitVersion.yml defined.
Also, this project exposes a helper that allows exposing computed GitVersion variables at runtime:
Building and running locally works ok (I'm having issues with version
6.0.0
as signaled in #4116, but that is another story).For this project I have a Dockerfile:
Note that
COPY . .
also copies the .git folder as it is commented out in the.dockerignore
fileBuilding the image locally works.
However building the image in a AzureDevOps pipeline, triggered for every commit on a
feature/something
branch, fails.The pipeline yaml, is:
The pipeline fails at the docker build step, at the build stage with:
I don't understand why the MSbuild task fails. given that:
I've also tried tagging (and pushing the tag) the commit from which I'm trigger the pipeline, but the error remains.
Also, I don't understand why the same identical Dockerfile is correctly built locally with
docker build
, but fails in the pipeline.Maybe I'm missing something in the .git folder maybe, but I'm not sure what.
Are there any additional props / argument I could supply via the MSBuild props in the csproj file, that could help me understand the issue?
As documented in Extra Properties here, and in CLI Arguments here, I've tried adding
but it didn't yield any difference in the output
I know about using the GitTools bundle of AzDO tasks directly in a pipeline, but I need the MSBuild to run during image building, because I need the GitVersionHelper to supply computed variables at runtime, not only at build time.
@arturcic and anyone else, any hints are welcome., I'm stumped.
Beta Was this translation helpful? Give feedback.
All reactions