dotnet-docker
dotnet-docker copied to clipboard
Allow Set-DotNetVersions script to read from config.json for .NET releases
Describe the Problem
Manually looking up the product versions to release and typing them in/copying them to the commandline takes time and is error-prone.
Describe the Solution
The .NET Release staging pipeline outputs a file called config.json
that contains the .NET versions in the build. It looks like this:
{
"Channel": "8.0",
"Release": "8.0.3",
"Runtime": "8.0.3",
"Asp": "8.0.3",
"Sdks": [
"8.0.202",
"8.0.103"
],
...
"Runtime_Build": "8.0.3-servicing.24114.23",
"Asp_Build": "8.0.3-servicing.24116.15",
"Sdk_Builds": [
"8.0.202-servicing.24116.49",
"8.0.103-servicing.24116.48"
],
...
}
We should be able to read from this file in order to set the correct .NET versions for a release.
Ideally, we could also connect directly to Azure DevOps. I would like to be able to give Set-DotNetVersions.ps1 a build number and have it update everything automatically.
[Triage] This would be a good gradual step towards release automation and simplify the release process for .NET container images.
Here's one way to get the config.json file using the az CLI -
PS> az pipelines runs artifact download --organization https://dev.azure.com/dnceng/ --project internal --run-id $buildId --path . --artifact-name drop
I wrote a prototype script that accomplishes this (locally). It takes an AzDo build ID and calls Set-DotnetVersions.ps1
:
https://gist.github.com/lbussell/4a1ee1e552e7db69fccbfd359e14984f#file-set-dotnetversionsfrombuild-ps1
Completed with https://github.com/dotnet/dotnet-docker/pull/5496