Skip to content

Commit cf93dff

Browse files
[ci] Govern dnceng internal pipeline (#12530)
## Summary - Migrate `dotnet-android-internal` to the official 1ES governed pipeline template while preserving its triggers, stage graph, pool images, signing flow, artifact names, and package-test JDK selection. - Resolve repository-local templates explicitly from `@self` and classify auxiliary repositories for SDL scanning. - Use the lightweight `dotnet/macios-devtools` repository wherever a second checkout exists only to keep the primary repository at `s/android`. This covers the internal, public, official/shared, and nightly pipelines; comments document why the checkout is required. Real MAUI integration jobs continue to check out `dotnet/maui`. - Remove preinstalled .NET SDKs and runtimes from hosted macOS test agents before setup to prevent low-disk warnings without weakening the existing warning gate. ## Validation - Azure DevOps template previews succeeded for the internal, public, official, PR, and nightly pipeline definitions. - [Internal validation build 3060061](https://dev.azure.com/dnceng/internal/_build/results?buildId=3060061) ran commit `c33b84759`: 38 jobs passed and all hosted macOS jobs completed with zero low-disk warnings. - The five failed jobs contain the same existing CheckLint test failures reproduced by the non-governed `main` build; no migration, checkout-shim, or disk-cleanup regression was found. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 68c63c0 commit cf93dff

9 files changed

Lines changed: 936 additions & 858 deletions

build-tools/automation/azure-pipelines-internal.yaml

Lines changed: 883 additions & 836 deletions
Large diffs are not rendered by default.

build-tools/automation/azure-pipelines-nightly.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ resources:
1515
type: git
1616
name: DevDiv/Xamarin.yaml-templates
1717
ref: refs/heads/main
18-
- repository: maui
18+
- repository: macios-devtools
1919
type: github
20-
name: dotnet/maui
21-
ref: net11.0
20+
name: dotnet/macios-devtools
21+
ref: refs/heads/main
2222
endpoint: xamarin
2323

2424
parameters:

build-tools/automation/azure-pipelines-public.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ parameters:
3333
# Repository resources
3434
resources:
3535
repositories:
36+
- repository: macios-devtools
37+
type: github
38+
name: dotnet/macios-devtools
39+
endpoint: public
40+
ref: refs/heads/main
3641
- repository: maui
3742
type: github
3843
name: dotnet/maui
@@ -81,10 +86,11 @@ stages:
8186
submodules: recursive
8287
persistCredentials: false
8388

84-
# Checkout a second repo to force multi-repo checkout behavior
89+
# This small repository is intentionally unused; its checkout keeps the
90+
# primary repository at s/android under Azure's multi-repo layout.
8591
# https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path
86-
- checkout: maui
87-
path: s/maui
92+
- checkout: macios-devtools
93+
path: s/macios-devtools
8894

8995
- template: /build-tools/automation/yaml-templates/build-macos-steps.yaml
9096
parameters:
@@ -141,9 +147,10 @@ stages:
141147
submodules: recursive
142148
persistCredentials: false
143149

144-
# Checkout a second repo to force multi-repo checkout behavior
145-
- checkout: maui
146-
path: s/maui
150+
# This small repository is intentionally unused; its checkout keeps the
151+
# primary repository at s/android under Azure's multi-repo layout.
152+
- checkout: macios-devtools
153+
path: s/macios-devtools
147154

148155
- script: |
149156
sudo apt-get update

build-tools/automation/azure-pipelines.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ resources:
2121
type: git
2222
name: DevDiv/Xamarin.yaml-templates
2323
ref: refs/heads/main
24+
- repository: macios-devtools
25+
type: github
26+
name: dotnet/macios-devtools
27+
ref: refs/heads/main
28+
endpoint: xamarin
2429
- repository: maui
2530
type: github
2631
name: dotnet/maui
@@ -75,6 +80,7 @@ extends:
7580
sourceRepositoriesToScan:
7681
exclude:
7782
- repository: yaml-templates
83+
- repository: macios-devtools
7884
- repository: maui
7985
suppression:
8086
suppressionFile: $(Build.SourcesDirectory)\.gdn\.gdnsuppress

build-tools/automation/yaml-templates/build-linux.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ stages:
4040
resource: ${{ parameters.repositoryAlias }}
4141
commit: ${{ parameters.checkoutCommit }}
4242

43-
# Always checkout a second resource to ensure we are using multi-repo checkout behavior
43+
# This small repository is intentionally unused; its checkout keeps the
44+
# primary repository at s/android under Azure's multi-repo layout.
4445
# https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path
45-
- checkout: maui
46+
- checkout: macios-devtools
4647

4748
- template: /build-tools/automation/yaml-templates/build-linux-steps.yaml
4849
parameters:

build-tools/automation/yaml-templates/build-macos.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ stages:
7373
resource: ${{ parameters.repositoryAlias }}
7474
commit: ${{ parameters.checkoutCommit }}
7575

76-
# Always checkout a second resource to ensure we are using multi-repo checkout behavior
76+
# This small repository is intentionally unused; its checkout keeps the
77+
# primary repository at s/android under Azure's multi-repo layout.
7778
# https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path
78-
- checkout: maui
79+
- checkout: macios-devtools
7980

8081
- task: CodeQL3000Init@0
8182
displayName: CodeQL 3000 Init

build-tools/automation/yaml-templates/commercial-build.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ steps:
2222
inputs:
2323
forceReinstallCredentialProvider: true
2424

25-
# Always checkout a second resource to ensure we are using multi-repo checkout behavior
25+
# This small repository is intentionally unused; its checkout keeps the
26+
# primary repository at s/android under Azure's multi-repo layout.
2627
# https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path
27-
- checkout: maui
28+
- checkout: macios-devtools
2829

2930
- task: CodeQL3000Init@0
3031
displayName: CodeQL 3000 Init

build-tools/automation/yaml-templates/setup-test-environment-public.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ steps:
3535
installTestSlicer: ${{ parameters.installTestSlicer }}
3636
installApkDiff: ${{ parameters.installApkDiff }}
3737
androidSdkPlatforms: ${{ parameters.androidSdkPlatforms }}
38-
use1ESTemplate: false
38+
use1ESTemplate: ${{ parameters.use1ESTemplate }}

build-tools/automation/yaml-templates/stage-package-tests.yaml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
parameters:
44
macTestAgentsUseCleanImages:
5+
usePublicSetupTemplate: false
56
use1ESTemplate: true
67

78
stages:
@@ -21,9 +22,16 @@ stages:
2122
workspace:
2223
clean: all
2324
steps:
24-
- template: /build-tools/automation/yaml-templates/setup-test-environment.yaml
25-
parameters:
26-
use1ESTemplate: ${{ parameters.use1ESTemplate }}
25+
- ${{ if eq(parameters.usePublicSetupTemplate, true) }}:
26+
- template: /build-tools/automation/yaml-templates/setup-test-environment-public.yaml
27+
parameters:
28+
jdkMajorVersion: $(DefaultJavaSdkMajorVersion)
29+
useAgentJdkPath: true
30+
use1ESTemplate: ${{ parameters.use1ESTemplate }}
31+
- ${{ else }}:
32+
- template: /build-tools/automation/yaml-templates/setup-test-environment.yaml
33+
parameters:
34+
use1ESTemplate: ${{ parameters.use1ESTemplate }}
2735

2836
- task: DownloadPipelineArtifact@2
2937
inputs:
@@ -108,9 +116,16 @@ stages:
108116
workspace:
109117
clean: all
110118
steps:
111-
- template: /build-tools/automation/yaml-templates/setup-test-environment.yaml
112-
parameters:
113-
use1ESTemplate: ${{ parameters.use1ESTemplate }}
119+
- ${{ if eq(parameters.usePublicSetupTemplate, true) }}:
120+
- template: /build-tools/automation/yaml-templates/setup-test-environment-public.yaml
121+
parameters:
122+
jdkMajorVersion: $(DefaultJavaSdkMajorVersion)
123+
useAgentJdkPath: true
124+
use1ESTemplate: ${{ parameters.use1ESTemplate }}
125+
- ${{ else }}:
126+
- template: /build-tools/automation/yaml-templates/setup-test-environment.yaml
127+
parameters:
128+
use1ESTemplate: ${{ parameters.use1ESTemplate }}
114129

115130
- task: DownloadPipelineArtifact@2
116131
inputs:

0 commit comments

Comments
 (0)