Closed carlossanlop closed 1 week ago
Per offline discussion we should try to make this work with https://learn.microsoft.com/en-us/azure/devops/pipelines/process/runtime-parameters?view=azure-devops&tabs=script#use-parameters-in-pipelines
There are 3 possible values according to the docs:
I switched to trying using parameters: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/runtime-parameters?view=azure-devops&tabs=script
Here's a job testing it: https://dev.azure.com/dnceng/internal/_build/results?buildId=2581675&view=logs&s=6884a131-87da-5381-61f3-d7acc3b91d76
Here's how setting the parameter looks like:
It's taking forever to run, so I'll check tomorrow.
It's working!
Script contents: shell
eng\common\cibuild.cmd -configuration Release -prepareMachine /p:Test=false /p:DotNetFinalVersionKind=prerelease /p:Test=false /p:DotNetSignType=real /p:TeamName=dotnet-core /p:DotNetPublishUsingPipelines=true /p:OfficialBuildId=20241113.5
Can I supply an empty value as well?
Can I supply an empty value as well?
Sure, go ahead. I tried this and didn't work: https://github.com/dotnet/maintenance-packages/pull/170/commits/0dd40cefa9a070d19fae76d2c22d79156aa749b3
And if you can make it default, even better.
What about adding a "none" option that in YML then gets set to ''
?
I tried with "none" but it's passed as the literal string "none", instead of getting converted to ''. It didn't work:
eng\common\cibuild.cmd -configuration Release -prepareMachine /p:Test=false /p:DotNetFinalVersionKind=none /p:Test=false /p:DotNetSignType=real /p:TeamName=dotnet-core /p:DotNetPublishUsingPipelines=true /p:OfficialBuildId=20241114.1
So I added a condition that selects the value of the _DotNetFinalVersionKind variable depending on the value of the parameter. It worked!
eng\common\cibuild.cmd -configuration Release -prepareMachine /p:Test=false /p:Test=false /p:DotNetSignType=real /p:TeamName=dotnet-core /p:DotNetPublishUsingPipelines=true /p:OfficialBuildId=20241114.2
Didn't work in the internal test run.