Skip to content

Commit 32400f6

Browse files
eduardo-vpkotlarmilosjkoritzinskyakoeplingeram11
authored
[release/8.0-staging] Backport 1ES templates (#102681)
* [mono][infra] Fix mono-aot-cross build for linux-arm64 using biarch image (#91019) * Use host rootfs when TARGET_BUILD_ARCH matches * Don't build libraries native packages in the PGO leg (#92729) * Reenable OneLocBuild in runtime-official.yml (#95014) * Move FreeBSD CI leg to CBL-Mariner and v13 (#97038) * Use Ubuntu-22.04-based Tizen image (#98589) * Start moving over to official templates (#99433) * Start moving over to official templates * Parameterize runtime-inner-loop * Use default false for isOfficialBuild in pipeline-with-resources * Respond to PR comments * Code review comments * Use default template args * Move linux_x86, tizen_armel, and freebsd_x64 jobs to global-build.yml * Update thunktemplates.S (#100066) * Import pool providers (#100851) Import pool-providers in common variables. This should allow all stages access to the pool provider variables. * Pass templatePath to eng/pipelines/common/templates/runtimes/xplat-job.yml --------- Co-authored-by: Milos Kotlar <[email protected]> Co-authored-by: Jeremy Koritzinsky <[email protected]> Co-authored-by: Alexander Köplinger <[email protected]> Co-authored-by: Adeel Mujahid <[email protected]> Co-authored-by: Andy Gocke <[email protected]> Co-authored-by: Filip Navara <[email protected]> Co-authored-by: Eduardo Manuel Velarde Polar <[email protected]>
1 parent 7b08fa8 commit 32400f6

25 files changed

+478
-238
lines changed

eng/pipelines/common/global-build-job.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ parameters:
3030
extraVariablesTemplates: []
3131
isManualCodeQLBuild: false
3232
preBuildSteps: []
33+
templatePath: 'templates'
3334

3435
jobs:
35-
- template: /eng/common/templates/job/job.yml
36+
- template: /eng/common/${{ parameters.templatePath }}/job/job.yml
3637
parameters:
3738
${{ if eq(parameters.hostedOs, '') }}:
3839
name: ${{ format('build_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.nameSuffix) }}
@@ -141,6 +142,7 @@ jobs:
141142

142143
- ${{ each variable in parameters.variables }}:
143144
- ${{ variable }}
145+
144146
steps:
145147
- ${{ if eq(parameters.osGroup, 'windows') }}:
146148
- template: /eng/pipelines/common/templates/disable-vsupdate-or-failfast.yml
@@ -181,7 +183,7 @@ jobs:
181183
path: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles'
182184

183185
- ${{ if eq(parameters.isSourceBuild, true) }}:
184-
- template: /eng/common/templates/steps/source-build.yml
186+
- template: /eng/common/${{ parameters.templatePath }}/steps/source-build.yml
185187
parameters:
186188
platform:
187189
baseOS: ${{ parameters.baseOS }}
@@ -285,14 +287,16 @@ jobs:
285287
displayName: Collect vslogs on exit
286288
condition: always()
287289

288-
- task: PublishBuildArtifacts@1
289-
displayName: Publish Logs
290-
inputs:
291-
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/'
292-
PublishLocation: Container
293-
${{ if notin(parameters.osGroup, 'browser', 'wasi') }}:
294-
ArtifactName: Logs_Build_Attempt$(System.JobAttempt)_${{ parameters.osGroup }}_${{ parameters.osSubGroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
295-
${{ if in(parameters.osGroup, 'browser', 'wasi') }}:
296-
ArtifactName: Logs_Build_Attempt$(System.JobAttempt)_${{ parameters.osGroup }}_${{ parameters.archType }}_${{ parameters.hostedOs }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
297-
continueOnError: true
298-
condition: always()
290+
- template: /eng/pipelines/common/templates/publish-build-artifacts.yml
291+
parameters:
292+
isOfficialBuild: ${{ parameters.isOfficialBuild }}
293+
displayName: Publish Logs
294+
inputs:
295+
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/'
296+
PublishLocation: Container
297+
${{ if notin(parameters.osGroup, 'browser', 'wasi') }}:
298+
ArtifactName: Logs_Build_Attempt$(System.JobAttempt)_${{ parameters.osGroup }}_${{ parameters.osSubGroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
299+
${{ if in(parameters.osGroup, 'browser', 'wasi') }}:
300+
ArtifactName: Logs_Build_Attempt$(System.JobAttempt)_${{ parameters.osGroup }}_${{ parameters.archType }}_${{ parameters.hostedOs }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
301+
continueOnError: true
302+
condition: always()
Lines changed: 121 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,124 @@
11
parameters:
22
- name: stages
33
type: stageList
4-
5-
resources:
6-
containers:
7-
- container: linux_arm
8-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm
9-
env:
10-
ROOTFS_DIR: /crossrootfs/arm
11-
12-
- container: linux_armv6
13-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-cross-armv6-raspbian-10
14-
env:
15-
ROOTFS_DIR: /crossrootfs/armv6
16-
17-
- container: linux_arm64
18-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64
19-
env:
20-
ROOTFS_DIR: /crossrootfs/arm64
21-
22-
- container: linux_musl_x64
23-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64-alpine
24-
env:
25-
ROOTFS_DIR: /crossrootfs/x64
26-
27-
- container: linux_musl_arm
28-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine
29-
env:
30-
ROOTFS_DIR: /crossrootfs/arm
31-
32-
- container: linux_musl_arm64
33-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64-alpine
34-
env:
35-
ROOTFS_DIR: /crossrootfs/arm64
36-
37-
# This container contains all required toolsets to build for Android and for Linux with bionic libc.
38-
- container: linux_bionic
39-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-android-amd64
40-
41-
# This container contains all required toolsets to build for Android as well as tooling to build docker images.
42-
- container: android_docker
43-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-android-docker
44-
45-
- container: linux_x64
46-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64
47-
env:
48-
ROOTFS_DIR: /crossrootfs/x64
49-
50-
- container: linux_x86
51-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-x86
52-
env:
53-
ROOTFS_DIR: /crossrootfs/x86
54-
55-
- container: linux_x64_dev_innerloop
56-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04
57-
58-
# We use a CentOS Stream 9 image here to test building from source on CentOS Stream 9.
59-
- container: SourceBuild_centos_x64
60-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
61-
62-
# AlmaLinux 8 is a RHEL 8 rebuild, so we use it to test building from source on RHEL 8.
63-
- container: SourceBuild_linux_x64
64-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-source-build
65-
66-
- container: linux_s390x
67-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-s390x
68-
env:
69-
ROOTFS_DIR: /crossrootfs/s390x
70-
71-
- container: linux_ppc64le
72-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-ppc64le
73-
env:
74-
ROOTFS_DIR: /crossrootfs/ppc64le
75-
76-
- container: linux_riscv64
77-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-riscv64
78-
env:
79-
ROOTFS_DIR: /crossrootfs/riscv64
80-
81-
- container: debian-12-gcc13-amd64
82-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc13-amd64
83-
84-
- container: linux_x64_llvmaot
85-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
86-
87-
- container: browser_wasm
88-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-webassembly-20230913040940-1edc1c6
89-
env:
90-
ROOTFS_DIR: /crossrootfs/x64
91-
92-
- container: wasi_wasm
93-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-webassembly-20230913040940-1edc1c6
94-
env:
95-
ROOTFS_DIR: /crossrootfs/x64
96-
97-
- container: freebsd_x64
98-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-freebsd-12
99-
env:
100-
ROOTFS_DIR: /crossrootfs/x64
101-
102-
- container: tizen_armel
103-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-armel-tizen
104-
env:
105-
ROOTFS_DIR: /crossrootfs/armel
106-
107-
- container: debpkg
108-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg
109-
110-
- container: rpmpkg
111-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm
112-
113-
stages: ${{ parameters.stages }}
4+
- name: isOfficialBuild
5+
type: boolean
6+
default: false
7+
8+
extends:
9+
template: templateDispatch.yml
10+
parameters:
11+
${{ if parameters.isOfficialBuild }}:
12+
templatePath: template1es.yml
13+
${{ else }}:
14+
templatePath: templatePublic.yml
15+
16+
stages: ${{ parameters.stages }}
17+
18+
containers:
19+
linux_arm:
20+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm
21+
env:
22+
ROOTFS_DIR: /crossrootfs/arm
23+
24+
linux_armv6:
25+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-cross-armv6-raspbian-10
26+
env:
27+
ROOTFS_DIR: /crossrootfs/armv6
28+
29+
linux_arm64:
30+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-biarch-amd64-arm64
31+
env:
32+
ROOTFS_HOST_DIR: /crossrootfs/x64
33+
ROOTFS_DIR: /crossrootfs/arm64
34+
35+
linux_musl_x64:
36+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64-alpine
37+
env:
38+
ROOTFS_DIR: /crossrootfs/x64
39+
40+
linux_musl_arm:
41+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine
42+
env:
43+
ROOTFS_DIR: /crossrootfs/arm
44+
45+
linux_musl_arm64:
46+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64-alpine
47+
env:
48+
ROOTFS_DIR: /crossrootfs/arm64
49+
50+
# This container contains all required toolsets to build for Android and for Linux with bionic libc.
51+
linux_bionic:
52+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-android-amd64
53+
54+
# This container contains all required toolsets to build for Android as well as tooling to build docker images.
55+
android_docker:
56+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-android-docker
57+
58+
linux_x64:
59+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64
60+
env:
61+
ROOTFS_DIR: /crossrootfs/x64
62+
63+
linux_x86:
64+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-x86
65+
env:
66+
ROOTFS_DIR: /crossrootfs/x86
67+
68+
linux_x64_dev_innerloop:
69+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04
70+
71+
# We use a CentOS Stream 9 image here to test building from source on CentOS Stream 9.
72+
SourceBuild_centos_x64:
73+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
74+
75+
# AlmaLinux 8 is a RHEL 8 rebuild, so we use it to test building from source on RHEL 8.
76+
SourceBuild_linux_x64:
77+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-source-build
78+
79+
linux_s390x:
80+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-s390x
81+
env:
82+
ROOTFS_DIR: /crossrootfs/s390x
83+
84+
linux_ppc64le:
85+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-ppc64le
86+
env:
87+
ROOTFS_DIR: /crossrootfs/ppc64le
88+
89+
linux_riscv64:
90+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-riscv64
91+
env:
92+
ROOTFS_DIR: /crossrootfs/riscv64
93+
94+
debian-12-gcc13-amd64:
95+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc13-amd64
96+
97+
linux_x64_llvmaot:
98+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
99+
100+
browser_wasm:
101+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-webassembly-20230913040940-1edc1c6
102+
env:
103+
ROOTFS_DIR: /crossrootfs/x64
104+
105+
wasi_wasm:
106+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-webassembly-20230913040940-1edc1c6
107+
env:
108+
ROOTFS_DIR: /crossrootfs/x64
109+
110+
freebsd_x64:
111+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64-freebsd-13
112+
env:
113+
ROOTFS_DIR: /crossrootfs/x64
114+
115+
tizen_armel:
116+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-armel-tizen
117+
env:
118+
ROOTFS_DIR: /crossrootfs/armel
119+
120+
debpkg:
121+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg
122+
123+
rpmpkg:
124+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
parameters:
2+
- name: isOfficialBuild
3+
type: boolean
4+
- name: displayName
5+
type: string
6+
- name: inputs
7+
type: object
8+
- name: condition
9+
type: string
10+
default: ''
11+
12+
steps:
13+
- ${{ if parameters.isOfficialBuild }}:
14+
- task: 1ES.PublishBuildArtifacts@1
15+
displayName: ${{ parameters.displayName }}
16+
inputs: ${{ parameters.inputs }}
17+
condition: ${{ parameters.condition }}
18+
- ${{ else }}:
19+
- task: PublishBuildArtifacts@1
20+
displayName: ${{ parameters.displayName }}
21+
inputs: ${{ parameters.inputs }}
22+
condition: ${{ parameters.condition }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
parameters:
2+
- name: displayName
3+
type: string
4+
- name: inputs
5+
type: object
6+
- name: isOfficialBuild
7+
type: boolean
8+
9+
steps:
10+
- ${{ if parameters.isOfficialBuild }}:
11+
- task: 1ES.PublishPipelineArtifact@1
12+
displayName: ${{ parameters.displayName }}
13+
inputs: ${{ parameters.inputs }}
14+
- ${{ else }}:
15+
- task: PublishPipelineArtifact@1
16+
displayName: ${{ parameters.displayName }}
17+
inputs: ${{ parameters.inputs }}

eng/pipelines/common/templates/runtimes/build-test-job.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ parameters:
1414
dependsOn: []
1515
dependOnEvaluatePaths: false
1616
crossBuild: false
17+
isOfficialBuild: false
1718

1819
### Build managed test components (native components are getting built as part
1920
### of the product build job).
@@ -142,12 +143,13 @@ jobs:
142143
artifactName: $(microsoftNetSdkIlArtifactName)
143144
displayName: 'Microsoft.NET.Sdk.IL package'
144145

145-
146146
# Publish Logs
147-
- task: PublishPipelineArtifact@1
148-
displayName: Publish Logs
149-
inputs:
150-
targetPath: $(Build.SourcesDirectory)/artifacts/log
151-
artifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_Attempt$(System.JobAttempt)_AnyOS_AnyCPU_$(buildConfig)_${{ parameters.testGroup }}'
152-
continueOnError: true
153-
condition: always()
147+
- template: /eng/pipelines/common/templates/publish-pipeline-artifacts.yml
148+
parameters:
149+
displayName: Publish Logs
150+
isOfficialBuild: ${{ parameters.isOfficialBuild }}
151+
inputs:
152+
targetPath: $(Build.SourcesDirectory)/artifacts/log
153+
ArtifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_Attempt$(System.JobAttempt)_AnyOS_AnyCPU_$(buildConfig)_${{ parameters.testGroup }}'
154+
continueOnError: true
155+
condition: always()

eng/pipelines/common/templates/runtimes/xplat-job.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ parameters:
2020
enableMicrobuild: ''
2121
gatherAssetManifests: false
2222
disableComponentGovernance: false
23+
templatePath: 'templates'
2324

2425
variables: {} ## any extra variables to add to the defaults defined below
2526

2627
jobs:
27-
- template: /eng/common/templates/job/job.yml
28+
- template: /eng/common/${{ parameters.templatePath }}/job/job.yml
2829
parameters:
2930

3031
name: ${{ parameters.name }}

0 commit comments

Comments
 (0)