Skip to content

Commit b4143f9

Browse files
committed
Merge branch 'eng' into AllowVersionParameters
2 parents f67da12 + b7b62bb commit b4143f9

File tree

5 files changed

+23
-5
lines changed

5 files changed

+23
-5
lines changed

eng/pipelines/official.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ pr: none
66

77
# Required to set a custom run name within workload-build.yml.
88
# See: https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/pipeline
9-
appendCommitMessageToRunName: false
9+
# ==========================
10+
# TODO: Temporarily commenting out updating the build number.
11+
# appendCommitMessageToRunName: false
1012

1113
parameters:
1214
- name: sourceBranch

eng/pipelines/templates/jobs/workload-build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ jobs:
99
publishAssetsImmediately: true
1010
enableSbom: true
1111
repositoryAlias: source
12+
# This variable is evaluated when this job template is executed.
13+
# Therefore, the value will not be affected by the updatebuildnumber script below.
14+
officialBuildId: $[variables['Build.BuildNumber']]
1215
artifacts:
1316
publish:
1417
artifacts:
@@ -34,13 +37,18 @@ jobs:
3437
# See: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/run-number
3538
- powershell: |
3639
Write-Host "##vso[task.setvariable variable=OfficialBuildId]$(Build.BuildNumber)"
40+
Write-Host "##vso[task.setvariable variable=OfficialBuildIdFromJob;isoutput=true]$(Build.BuildNumber)"
3741
# Keep only valid characters. Invalid characters include: " / : < > \ | ? @ *
3842
# Also, strip any trailing '.' characters as those are invalid too.
3943
$commitMessage = "$(git log -1 --pretty=%s)".Trim() -replace '["\/:<>\\|?@*]|\.{1,}$', ''
4044
# Lastly, truncate to 255 max characters: 241 = 255 - 14 (for build number and delimiter, ex: 20250910.13 • )
4145
$commitMessage = $commitMessage.Substring(0, [Math]::Min($commitMessage.Length, 241))
42-
Write-Host "##vso[build.updatebuildnumber]$(Build.BuildNumber) • $commitMessage"
46+
# ==========================
47+
# TODO: Temporarily commenting out updating the build number.
48+
# Write-Host "##vso[build.updatebuildnumber]$(Build.BuildNumber) • $commitMessage"
4349
displayName: 🟣 Set run name via source branch commit message
50+
# Name is required to reference the variables created within this build step in other stages.
51+
name: SetRunName
4452
- ${{ if eq(parameters.createVSInsertion, true) }}:
4553
# The convertToJson expression in AzDO creates "pretty" JSON with line breaks and indentation.
4654
# To simplify passing this JSON to scripts, we collapse it to a single line.

eng/pipelines/templates/jobs/workload-insertion-job.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
templateContext:
2020
type: buildJob
2121
variables:
22+
- name: OfficialBuildIdFromJob
23+
value: $[stageDependencies.Build.BuildRepo.outputs['SetRunName.OfficialBuildIdFromJob']]
2224
- name: PrimaryVSComponentJsonValues
2325
value: $[stageDependencies.Build.BuildRepo.outputs['BuildSolution.PrimaryVSComponentJsonValues']]
2426
- name: SecondaryVSComponentJsonValues
@@ -90,11 +92,13 @@ jobs:
9092
topicBranch: ${{ parameters.vsTopicBranch }}
9193
# PrimaryVSComponentJsonValues variable is set during create-workload-drops.ps1 in Microsoft.NET.Workloads.Vsman.csproj.
9294
componentJsonValues: $(PrimaryVSComponentJsonValues)
95+
officialBuildId: $(OfficialBuildIdFromJob)
9396
- ${{ each secondaryInsertionBranch in parameters.secondaryVsInsertionBranches }}:
9497
# One PR is created per branch defined at the top of official.yml in the secondaryVsInsertionBranches parameter.
9598
- template: /eng/pipelines/templates/steps/workload-insertion-steps.yml@self
9699
parameters:
97100
targetBranch: ${{ secondaryInsertionBranch }}
98101
topicBranch: ${{ parameters.vsTopicBranch }}
99102
# SecondaryVSComponentJsonValues variable is set during create-workload-drops.ps1 in Microsoft.NET.Workloads.Vsman.csproj.
100-
componentJsonValues: $(SecondaryVSComponentJsonValues)
103+
componentJsonValues: $(SecondaryVSComponentJsonValues)
104+
officialBuildId: $(OfficialBuildIdFromJob)

eng/pipelines/templates/steps/workload-insertion-steps.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ parameters:
22
targetBranch: main
33
topicBranch: ''
44
componentJsonValues: ''
5+
officialBuildId: ''
56

67
steps:
78
# This allows setting the InsertionTopicBranch variable dynamically.
@@ -16,7 +17,7 @@ steps:
1617
# Loosely based on:
1718
# https://devdiv.visualstudio.com/Engineering/_git/MicroBuild?path=/src/Tasks/InsertVsPayload/plugin.ps1&version=GCf10314b240d5f3d0899e80eb2feb5dc33b5f8c20&line=276&lineEnd=280&lineStartColumn=1&lineEndColumn=1&lineStyle=plain&_a=contents
1819
if ($topicBranch -eq '|temp|') {
19-
$topicBranch = 'temp/$(_TeamName)/${{ parameters.targetBranch }}/$(Build.BuildNumber)-$(System.JobAttempt)'
20+
$topicBranch = 'temp/$(_TeamName)/${{ parameters.targetBranch }}/${{ parameters.officialBuildId }}-$(System.JobAttempt)'
2021
}
2122
Write-Host "InsertionTopicBranch: $topicBranch"
2223
Write-Host "##vso[task.setvariable variable=InsertionTopicBranch]$topicBranch"
@@ -34,7 +35,7 @@ steps:
3435
InsertionTopicBranch: $(InsertionTopicBranch)
3536
TeamName: $(_TeamName)
3637
TeamEmail: dotnetdevexcli@microsoft.com
37-
InsertionPayloadName: 'DotNet-SDK-Workloads ($(Build.SourceBranchName):$(Build.BuildNumber))'
38+
InsertionPayloadName: 'DotNet-SDK-Workloads ($(Build.SourceBranchName):${{ parameters.officialBuildId }})'
3839
ComponentJsonValues: ${{ parameters.componentJsonValues }}
3940
AllowTopicBranchUpdate: true
4041
# This is the name of our DevDiv alias.

src/Microsoft.NET.Workloads/workloads.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@
2525
<WorkloadManifest Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(VersionMajor)', '10'))" Include="Microsoft.NET.Workload.Mono.ToolChain.net9" FeatureBand="$(MonoWorkloadFeatureBand)" Version="$(MonoWorkloadManifestVersion)" />
2626
</ItemGroup>
2727

28+
<ItemGroup Label="Aspire" Condition="$([MSBuild]::VersionLessThanOrEquals('$(VersionMajor)', '9'))">
29+
<WorkloadManifest Include="Microsoft.NET.Sdk.Aspire" FeatureBand="$(AspireFeatureBand)" Version="$(AspireWorkloadManifestVersion)" />
30+
</ItemGroup>
2831
</Project>

0 commit comments

Comments
 (0)