Skip to content

Commit cc7649f

Browse files
committed
Merge branch 'eng' into AllowVersionParameters
2 parents b46d713 + 3bb1938 commit cc7649f

File tree

7 files changed

+47
-31
lines changed

7 files changed

+47
-31
lines changed

eng/pipelines/official.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
trigger: none
55
pr: none
66

7+
# Required to set a custom run name within workload-build.yml.
8+
# See: https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/pipeline
9+
appendCommitMessageToRunName: false
10+
711
parameters:
812
- name: sourceBranch
9-
displayName: 🚩 Source Branch 🚩
13+
displayName: 🚩 Source branch 🚩
1014
type: string
1115

1216
- name: dividerAzDO
@@ -31,7 +35,7 @@ parameters:
3135
type: boolean
3236
default: false
3337
- name: vsTopicBranch
34-
displayName: 'VS Topic Branch [default: temp/{team}/{target}/yyyy-MM]'
38+
displayName: 'VS topic branch [default: temp/{team}/{target}/yyyy-MM]'
3539
type: string
3640
default: '|default|'
3741
- name: workloadDropNames
@@ -73,7 +77,7 @@ parameters:
7377
type: boolean
7478
default: false
7579
- name: usePreComponentsForVSInsertion
76-
displayName: Use Preview Components for VS insertion
80+
displayName: Use preview components for VS insertion
7781
type: boolean
7882
default: false
7983
- name: includeNonShippingWorkloads

eng/pipelines/public.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ variables:
3838
stages:
3939
- template: /eng/pipelines/templates/stages/workload-public-build.yml@self
4040
parameters:
41-
sourceBranch: main
42-
engBranch: self
41+
sourceBranchAlias: main
42+
engBranchAlias: self
4343
- template: /eng/pipelines/templates/stages/workload-public-build.yml@self
4444
parameters:
45-
sourceBranch: release8
46-
engBranch: self
45+
sourceBranchAlias: release8
46+
engBranchAlias: self
4747
- template: /eng/pipelines/templates/stages/workload-public-build.yml@self
4848
parameters:
49-
sourceBranch: release9
50-
engBranch: self
49+
sourceBranchAlias: release9
50+
engBranchAlias: self

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,20 @@ jobs:
2727
steps:
2828
- template: /eng/pipelines/templates/steps/workload-checkout.yml@self
2929
parameters:
30-
sourceBranch: source
31-
engBranch: self
30+
sourceBranchAlias: source
31+
engBranchAlias: self
32+
# Sets the run name to use the source branch commit message.
33+
# Also, sets the OfficialBuildId variable to the original Build.BuildNumber for use in Arcade.
34+
# See: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/run-number
35+
- powershell: |
36+
Write-Host "##vso[task.setvariable variable=OfficialBuildId]$(Build.BuildNumber)"
37+
# Keep only valid characters. Invalid characters include: " / : < > \ | ? @ *
38+
# Also, strip any trailing '.' characters as those are invalid too.
39+
$commitMessage = "$(git log -1 --pretty=%s)".Trim() -replace '["\/:<>\\|?@*]|\.{1,}$', ''
40+
# Lastly, truncate to 255 max characters: 241 = 255 - 14 (for build number and delimiter, ex: 20250910.13 • )
41+
$commitMessage = $commitMessage.Substring(0, [Math]::Min($commitMessage.Length, 241))
42+
Write-Host "##vso[build.updatebuildnumber]$(Build.BuildNumber) • $commitMessage"
43+
displayName: 🟣 Set run name via source branch commit message
3244
- ${{ if eq(parameters.createVSInsertion, true) }}:
3345
# The convertToJson expression in AzDO creates "pretty" JSON with line breaks and indentation.
3446
# To simplify passing this JSON to scripts, we collapse it to a single line.
@@ -71,7 +83,7 @@ jobs:
7183
/p:DotNetSignType=$(_SignType)
7284
/p:TeamName=$(_TeamName)
7385
/p:DotNetPublishUsingPipelines=true
74-
/p:OfficialBuildId=$(Build.BuildNumber)
86+
/p:OfficialBuildId=$(OfficialBuildId)
7587
/p:StabilizePackageVersion=${{ parameters.stabilizePackageVersion }}
7688
displayName: 🟣 Build solution
7789
# Name is required to reference the variables created within this build step in other stages.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
# Otherwise, the workload drop directory path variables won't match the path on disk.
3535
- template: /eng/pipelines/templates/steps/workload-checkout.yml@self
3636
parameters:
37-
sourceBranch: source
38-
engBranch: self
37+
sourceBranchAlias: source
38+
engBranchAlias: self
3939
# This task, without the '1ES.' prefix, is not blocked on a buildJob type context.
4040
# 1ES docs: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/inputs/pipeline-artifact
4141
- task: DownloadPipelineArtifact@2

eng/pipelines/templates/stages/workload-public-build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
parameters:
2-
sourceBranch: self
3-
engBranch: eng
2+
sourceBranchAlias: self
3+
engBranchAlias: eng
44

55
stages:
6-
- stage: Build_${{ parameters.sourceBranch }}
7-
displayName: Build ${{ parameters.sourceBranch }}
6+
- stage: Build_${{ parameters.sourceBranchAlias }}
7+
displayName: Build ${{ parameters.sourceBranchAlias }}
88
dependsOn: []
99
jobs:
10-
- template: /eng/common/templates/job/job.yml@${{ parameters.sourceBranch }}
10+
- template: /eng/common/templates/job/job.yml@${{ parameters.sourceBranchAlias }}
1111
parameters:
1212
name: buildRepo
1313
displayName: Build Repo
@@ -17,12 +17,12 @@ stages:
1717
artifacts:
1818
publish:
1919
logs:
20-
name: Logs_${{ parameters.sourceBranch }}
20+
name: Logs_${{ parameters.sourceBranchAlias }}
2121
steps:
22-
- template: /eng/pipelines/templates/steps/workload-checkout.yml@${{ parameters.engBranch }}
22+
- template: /eng/pipelines/templates/steps/workload-checkout.yml@${{ parameters.engBranchAlias }}
2323
parameters:
24-
sourceBranch: ${{ parameters.sourceBranch }}
25-
engBranch: ${{ parameters.engBranch }}
24+
sourceBranchAlias: ${{ parameters.sourceBranchAlias }}
25+
engBranchAlias: ${{ parameters.engBranchAlias }}
2626
- powershell: >-
2727
eng/common/build.ps1
2828
-restore -build -pack -ci -msbuildEngine vs

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
parameters:
2-
sourceBranch: self
3-
engBranch: eng
2+
sourceBranchAlias: self
3+
engBranchAlias: eng
44

55
steps:
66
# For checkout mechanics, see:
77
# https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services
88
# https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/steps-checkout?view=azure-pipelines
99
# https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path
10-
- checkout: ${{ parameters.sourceBranch }}
10+
- checkout: ${{ parameters.sourceBranchAlias }}
1111
path: source-branch
1212
workspaceRepo: true
1313
displayName: 🟣 Checkout source branch
@@ -19,7 +19,7 @@ steps:
1919
# To resolve this, we split on '/' and take the last element, which will always be the repository name only.
2020
- powershell: New-Item -Path "$(Agent.BuildDirectory)\s" -Name "$('$(Build.Repository.Name)' -Split '/' | Select-Object -Last 1)" -ItemType Directory
2121
displayName: 🟣 [Workaround] Create checkout directory
22-
- checkout: ${{ parameters.engBranch }}
22+
- checkout: ${{ parameters.engBranchAlias }}
2323
path: eng-branch
2424
displayName: 🟣 Checkout eng branch
2525
# The \* is required for the Exclude to work properly.

src/Microsoft.NET.Workloads/workloads.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<WorkloadManifest Include="Microsoft.NET.Workload.Emscripten.Current" FeatureBand="$(EmscriptenWorkloadFeatureBand)" Version="$(EmscriptenWorkloadManifestVersion)" />
55
<WorkloadManifest Include="Microsoft.NET.Workload.Emscripten.net6" FeatureBand="$(EmscriptenWorkloadFeatureBand)" Version="$(EmscriptenWorkloadManifestVersion)" />
66
<WorkloadManifest Include="Microsoft.NET.Workload.Emscripten.net7" FeatureBand="$(EmscriptenWorkloadFeatureBand)" Version="$(EmscriptenWorkloadManifestVersion)" />
7-
<WorkloadManifest Include="Microsoft.NET.Workload.Emscripten.net8" FeatureBand="$(EmscriptenWorkloadFeatureBand)" Version="$(EmscriptenWorkloadManifestVersion)" />
8-
<WorkloadManifest Include="Microsoft.NET.Workload.Emscripten.net9" FeatureBand="$(EmscriptenWorkloadFeatureBand)" Version="$(EmscriptenWorkloadManifestVersion)" />
7+
<WorkloadManifest Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(VersionMajor)', '9'))" Include="Microsoft.NET.Workload.Emscripten.net8" FeatureBand="$(EmscriptenWorkloadFeatureBand)" Version="$(EmscriptenWorkloadManifestVersion)" />
8+
<WorkloadManifest Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(VersionMajor)', '10'))" Include="Microsoft.NET.Workload.Emscripten.net9" FeatureBand="$(EmscriptenWorkloadFeatureBand)" Version="$(EmscriptenWorkloadManifestVersion)" />
99
</ItemGroup>
1010

1111
<ItemGroup Label="Maui">
@@ -21,8 +21,8 @@
2121
<WorkloadManifest Include="Microsoft.NET.Workload.Mono.ToolChain.Current" FeatureBand="$(MonoWorkloadFeatureBand)" Version="$(MonoWorkloadManifestVersion)" />
2222
<WorkloadManifest Include="Microsoft.NET.Workload.Mono.ToolChain.net6" FeatureBand="$(MonoWorkloadFeatureBand)" Version="$(MonoWorkloadManifestVersion)" />
2323
<WorkloadManifest Include="Microsoft.NET.Workload.Mono.ToolChain.net7" FeatureBand="$(MonoWorkloadFeatureBand)" Version="$(MonoWorkloadManifestVersion)" />
24-
<WorkloadManifest Include="Microsoft.NET.Workload.Mono.ToolChain.net8" FeatureBand="$(MonoWorkloadFeatureBand)" Version="$(MonoWorkloadManifestVersion)" />
25-
<WorkloadManifest Include="Microsoft.NET.Workload.Mono.ToolChain.net9" FeatureBand="$(MonoWorkloadFeatureBand)" Version="$(MonoWorkloadManifestVersion)" />
24+
<WorkloadManifest Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(VersionMajor)', '9'))" Include="Microsoft.NET.Workload.Mono.ToolChain.net8" FeatureBand="$(MonoWorkloadFeatureBand)" Version="$(MonoWorkloadManifestVersion)" />
25+
<WorkloadManifest Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(VersionMajor)', '10'))" Include="Microsoft.NET.Workload.Mono.ToolChain.net9" FeatureBand="$(MonoWorkloadFeatureBand)" Version="$(MonoWorkloadManifestVersion)" />
2626
</ItemGroup>
2727

2828
</Project>

0 commit comments

Comments
 (0)