Skip to content

Conversation

@MiYanni
Copy link
Member

@MiYanni MiYanni commented Sep 10, 2025

Summary

When running the official build, the run name will always show the last commit message from the eng branch, which is not desired. What is ideal is showing the last commit message from the provided 'source branch' when the pipeline is ran. I figured this would be pretty simple and straightforward to set, but it was not. 😭

Details

When running a build, Azure Pipelines will, by default, use this format for the run name:

#$(Date:yyyyMMdd).$(Rev:r) • $(Build.SourceVersionMessage)

We actually want the $(Build.SourceVersionMessage) to be from the 'source branch' and not the eng branch. But, this value is not configurable. Updating the run name would be simple if there was just a "display name" value for this. However, there is not. Instead, it works as such:

  • Always shows a # as the first character no matter the settings.
  • The $(Date:yyyyMMdd).$(Rev:r) portion is actually the $(Build.BuildNumber) value.
  • The • $(Build.SourceVersionMessage) portion is actually shown via a boolean appendCommitMessageToRunName, which is set to true by default.

The only way to change this run name is by doing the following:

This allows you to "fully customize" the run name as long as Build.BuildNumber does not:

  • contains invalid character(s)
    • Characters which are not allowed include '"', '/', ':', '<', '>', '\', '|', '?', '@', and '*'.
  • is too long
    • The maximum length of a build number is 255 characters.
  • or ends with '.'.

So, I've been forced to clean the commit message from the source branch when I gather it to adhere to these requirements. This normally doesn't require this level of scrutiny when the default appendCommitMessageToRunName is used.

Another problem arose. Apparently, Arcade uses $(Build.BuildNumber) in various places. Generally, it is set to the OfficialBuildId property. We send that value here when we build, so I simply save the original value to a OfficialBuildId variable, and then use that when we build. That resolved the build issue.

The other Arcade issue is that the 'Publish Assets' stage has the use of $(Build.BuildNumber) hard-coded to be the OfficialBuildId property. To solve that, I've created a PR for Arcade to allow setting the OfficialBuildId property in 'Publish Assets' stage via the jobs.yml parameters. This change is required prior to merging this PR.

@MiYanni MiYanni requested review from a team and joeloff September 10, 2025 23:10
Comment on lines +2 to +3
sourceBranchAlias: self
engBranchAlias: eng
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated these parameter names to be more accurate as it was confusing since they aren't actually the branch names, but aliases to the repository for those branches.

…arameter display name casing to be consistent.
parameters:
- name: sourceBranch
displayName: 🚩 Source Branch 🚩
displayName: 🚩 Source branch 🚩
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjusted pipeline parameter display names to have consistent casing.

@MiYanni MiYanni requested a review from a team September 11, 2025 19:05
@MiYanni MiYanni added the DO NOT MERGE Use this label for a PR that is not ready to be merged yet label Sep 11, 2025
@MiYanni
Copy link
Member Author

MiYanni commented Sep 15, 2025

Changes from Arcade are merged in for 9. Waiting for 8 and main.
8 is merged now. Waiting for main to come from the VMR.

@MiYanni
Copy link
Member Author

MiYanni commented Sep 27, 2025

Awaiting #572 Merged. Now merging this.

@MiYanni MiYanni removed the DO NOT MERGE Use this label for a PR that is not ready to be merged yet label Sep 29, 2025
@MiYanni MiYanni merged commit 98811f9 into dotnet:eng Sep 29, 2025
5 checks passed
@MiYanni MiYanni deleted the UpdateRunNameForOfficial branch September 29, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants