Expose BuildQuality parameter on the Build Promotion pipeline - #17168
Conversation
The Build Promotion pipeline (eng/promote-build.yml) always published assets with the default 'daily' build quality because it never forwarded a quality to eng/publishing/v3/publish.yml. That meant a build could only ever be promoted to the 'daily' aka.ms link quality (aka.ms/dotnet/<channel>/daily/...); there was no supported way to promote an already-built build to the 'preview' (or other) quality without re-running the release/staging process. Add a BuildQuality parameter (default 'daily') and forward it to publish.yml so an operator can promote a build to a non-daily aka.ms link quality. publish.yml already accepts buildQuality, so this only threads the existing knob through. Backward compatible: the default is 'daily', and darc add-build-to-channel does not pass this parameter, so existing promotions are unchanged. BuildQuality is parsed with a case-insensitive Enum.TryParse in PublishArtifactsInManifest, so an unexpected value safely falls back to Daily. Motivating scenario: dotnetup ships from dotnet/sdk via aka.ms/dotnet/dotnetup/<quality>/... and needs a 'preview' quality selector (with rollback by re-promoting an older build) without a rebuild. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f118977e-1e71-40b0-8045-10f5ab006715
There was a problem hiding this comment.
Pull request overview
This PR updates the Build Promotion pipeline to allow operators to choose a non-default build quality (e.g., preview) when publishing assets and creating aka.ms links, by threading an existing buildQuality parameter through to the shared publishing template.
Changes:
- Add a
BuildQualityparameter (defaultdaily) toeng/promote-build.yml. - Forward the selected
BuildQualitytoeng/publishing/v3/publish.ymlasbuildQuality.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| BARBuildId: ${{ parameters.BARBuildId }} | ||
| symbolPublishingAdditionalParameters: ${{ parameters.SymbolPublishingAdditionalParameters }} | ||
| artifactsPublishingAdditionalParameters: ${{ parameters.ArtifactsPublishingAdditionalParameters }} No newline at end of file | ||
| artifactsPublishingAdditionalParameters: ${{ parameters.ArtifactsPublishingAdditionalParameters }} |
There was a problem hiding this comment.
This shuold alrewady be available via artifactsPublishingAdditionalParameters
This lets the build quality parameter (or others) be overridden
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (2)
eng/promote-build.yml:25
- The PR description/title says BuildQuality is exposed as a first-class parameter and forwarded to
eng/publishing/v3/publish.yml, buteng/promote-build.ymlstill doesn't define aBuildQualityparameter or passbuildQuality:into the template call. This displayName also suggests usingArtifactsPublishingAdditionalParametersto set/p:BuildQuality=..., which is a different (and less discoverable) mechanism than the described change.
Either add the BuildQuality pipeline parameter and forward it as buildQuality: ${{ parameters.BuildQuality }}, or remove the BuildQuality-specific example here to avoid implying this is the supported approach.
displayName: Additional (MSBuild) properties for general asset publishing (for example, /p:BuildQuality=preview)
eng/publishing/v3/publish.yml:169
- Inconsistent template-expression spacing: most other pipelines use a space before
}}(e.g.,eng/common/core-templates/job/publish-build-assets.yml:210,eng/common/core-templates/post-build/post-build.yml:319). Keeping the spacing consistent helps readability and makes searches/edits more uniform.
${{ parameters.symbolPublishingAdditionalParameters}}
The Build Promotion pipeline (eng/promote-build.yml) always published assets with the default 'daily' build quality because it never forwarded a quality to eng/publishing/v3/publish.yml. That meant a build could only ever be promoted to the 'daily' aka.ms link quality (aka.ms/dotnet//daily/...); there was no supported way to promote an already-built build to the 'preview' (or other) quality without re-running the release/staging process.
Add a BuildQuality parameter (default 'daily') and forward it to publish.yml so an operator can promote a build to a non-daily aka.ms link quality. publish.yml already accepts buildQuality, so this only threads the existing knob through.
Backward compatible: the default is 'daily', and darc add-build-to-channel does not pass this parameter, so existing promotions are unchanged. BuildQuality is parsed with a case-insensitive Enum.TryParse in PublishArtifactsInManifest, so an unexpected value safely falls back to Daily.
Motivating scenario: dotnetup ships from dotnet/sdk via aka.ms/dotnet/dotnetup//... and needs a 'preview' quality selector (with rollback by re-promoting an older build) without a rebuild.
UPDATE: Rather than adding a new parameter, this now moves the additional parameters to the end of the MSBuild command line so they can override existing properties such as the build quality.