Closed Depechie closed 2 months ago
So you're saying that the AzDo task has mutated the registry URL?
The build task logs the actual constructed publish command and it reads like so:
/usr/bin/dotnet publish /home/vsts/work/1/s/./src/ACAObservability.Web/ACAObservability.Web.csproj -p:PublishProfile=DefaultContainer -p:PublishSingleFile=true -p:PublishTrimmed=false --self-contained true --verbosity quiet --nologo -r linux-amd64 -p:ContainerRepository=acaobservability.web -p ContainerImageTags="187;latest" -p:ContainerRegistry=***'
Not sure 'who' does the obfuscation or mutation, but yeah that is what I notice indeed.
This may seem like a silly question, but could this be due to the stray single quote after the argument?
-p:ContainerRegistry="myawesomedummyname.azurecr.io"'
It shows up in the build task logs, too:
-p:ContainerRegistry=***'
That's an excellent idea @chrisoverzero.
One way we could find out for sure is with a binlog - one of the first lines in the binlog viewer is the complete MSBuild command line as seen by the engine.
Totally not a silly question!! Was a copy paste error :( the actual yaml file does not have that.
Hmmm now that you mention it, the composed logs has indeed the '
Let me change the yaml again and retest.
I will get back with more info.
Ok sorry for the inconvenience... I indeed had a rogue ' ( checked the GIT log ). And without it, everything works perfectly!
Glad to hear it @Depechie!
When using the DotNetCoreCLI@2 task in a Azure Devops pipeline, I can do a
dotnet publish
straight to my private Azure Container registry if I put the registry name as a property in the csproj file like:But trying to move this to a command parameter like so:
I see in the build log, that the task obfuscates the registry name to But it will also fail with the exception: `error CONTAINER2012: Could not recognize registry ''`