Make OfficialBuildId settable on publish assets#16122
Conversation
|
hmm we're using that variable in lots of other places: https://github.com/search?q=repo%3Adotnet%2Farcade%20%22Build_BuildNumber%22&type=code with this change those would diverge |
So, this change won't 'diverge' as it only allows overriding OfficialBuildId. The purpose here isn't about changing the use of If you had a pipeline that would exercise all pipeline templates and build uses of |
|
/backport to release/8.0 |
|
Started backporting to release/8.0: https://github.com/dotnet/arcade/actions/runs/17678924062 |
|
/backport to release/9.0 |
|
@MiYanni backporting to "release/8.0" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Allows you to set the OfficialBuildId for the publish build assets job.
Using index info to reconstruct a base tree...
A eng/common/core-templates/job/publish-build-assets.yml
A eng/common/core-templates/jobs/jobs.yml
Falling back to patching base and 3-way merge...
Auto-merging eng/common/templates-official/job/publish-build-assets.yml
CONFLICT (content): Merge conflict in eng/common/templates-official/job/publish-build-assets.yml
Auto-merging eng/common/templates-official/jobs/jobs.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Allows you to set the OfficialBuildId for the publish build assets job.
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
Started backporting to release/9.0: https://github.com/dotnet/arcade/actions/runs/17678928122 |
|
@MiYanni backporting to "release/9.0" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Allows you to set the OfficialBuildId for the publish build assets job.
Using index info to reconstruct a base tree...
M eng/common/core-templates/job/publish-build-assets.yml
M eng/common/core-templates/jobs/jobs.yml
Falling back to patching base and 3-way merge...
Auto-merging eng/common/core-templates/job/publish-build-assets.yml
CONFLICT (content): Merge conflict in eng/common/core-templates/job/publish-build-assets.yml
Auto-merging eng/common/core-templates/jobs/jobs.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Allows you to set the OfficialBuildId for the publish build assets job.
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
/backport to release/10.0 |
|
Started backporting to release/10.0: https://github.com/dotnet/arcade/actions/runs/17678940547 |
Summary
The Build.BuildNumber is a settable value in Azure Pipelines. When changed, it updates the run name for your pipeline (what you see as the name of a particular run of your pipeline).
Currently,
Build.BuildNumberis used in part of Arcade's build processes, as it parses information out of this value. However, this doesn't work for publishing build assets if you change the value at any point in your pipeline via thenamevalue or using the updatebuildnumber logging command. The solution was to allow the OfficialBuildId to be settable, but default toBuild.BuildNumberif not provided. I've done this defaulting logic for bothjobs.ymlandpublish-build-assets.ymlas to not break any existing uses of these templates.Note: I will need to backport these changes to Arcade 8 and 9 for my situation to work properly.