Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Set-DotNetVersions script to read from config.json for .NET releases #5295

Open
lbussell opened this issue Mar 21, 2024 · 3 comments
Open

Comments

@lbussell
Copy link
Contributor

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.

@lbussell
Copy link
Contributor Author

[Triage] This would be a good gradual step towards release automation and simplify the release process for .NET container images.

@lbussell
Copy link
Contributor Author

lbussell commented Apr 5, 2024

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

@lbussell
Copy link
Contributor Author

lbussell commented Apr 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Current Release
Development

No branches or pull requests

1 participant