Skip to content

Commit 448d1c6

Browse files
Merge
1 parent 89447d5 commit 448d1c6

21 files changed

+314
-133
lines changed

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

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ parameters:
2828
enableRichCodeNavigation: false
2929
richCodeNavigationLanguage: 'csharp'
3030
richCodeNavigationEnvironment: 'production'
31+
templatePath: 'templates'
3132
preBuildSteps: []
3233

3334
jobs:
34-
- template: /eng/common/templates/job/job.yml
35+
- template: /eng/common/${{ parameters.templatePath }}/job/job.yml
3536
parameters:
3637
name: ${{ format('build_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.nameSuffix) }}
3738
displayName: ${{ format('Build {0}{1} {2} {3} {4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.nameSuffix) }}
@@ -145,7 +146,7 @@ jobs:
145146
path: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles'
146147

147148
- ${{ if eq(parameters.buildingOnSourceBuildImage, true) }}:
148-
- template: /eng/common/templates/steps/source-build.yml
149+
- template: /eng/common/${{ parameters.templatePath }}/steps/source-build.yml
149150
parameters:
150151
platform:
151152
buildScript: $(_sclEnableCommand) $(Build.SourcesDirectory)$(dir)build$(scriptExt)
@@ -235,11 +236,16 @@ jobs:
235236
- ${{ else }}:
236237
- ${{ postBuildStep }}
237238

238-
- task: PublishBuildArtifacts@1
239-
displayName: Publish Logs
240-
inputs:
241-
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/'
242-
PublishLocation: Container
243-
ArtifactName: Logs_Build_${{ parameters.osGroup }}_${{ parameters.osSubGroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
244-
continueOnError: true
245-
condition: always()
239+
- template: /eng/pipelines/common/templates/publish-build-artifacts.yml
240+
parameters:
241+
isOfficialBuild: ${{ parameters.isOfficialBuild }}
242+
displayName: Publish Logs
243+
inputs:
244+
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/'
245+
PublishLocation: Container
246+
${{ if notin(parameters.osGroup, 'browser', 'wasi') }}:
247+
ArtifactName: Logs_Build_Attempt$(System.JobAttempt)_${{ parameters.osGroup }}_${{ parameters.osSubGroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
248+
${{ if in(parameters.osGroup, 'browser', 'wasi') }}:
249+
ArtifactName: Logs_Build_Attempt$(System.JobAttempt)_${{ parameters.osGroup }}_${{ parameters.archType }}_${{ parameters.hostedOs }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
250+
continueOnError: true
251+
condition: always()
Lines changed: 74 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,89 @@
11
parameters:
22
- name: stages
33
type: stageList
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:ubuntu-18.04-cross-arm-20220907130538-70ed2e8
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-20211208135931-e6e3ac4
26+
env:
27+
ROOTFS_DIR: /crossrootfs/armv6
28+
29+
Linux_arm64:
30+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-20210719121212-8a8d3be
31+
env:
32+
ROOTFS_DIR: /crossrootfs/arm64
33+
34+
Linux_musl_x64:
35+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-WithNode-20210910135845-c401c85
36+
37+
Linux_musl_arm:
38+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm-alpine-20220915134743-78f7860
39+
env:
40+
ROOTFS_DIR: /crossrootfs/arm
41+
42+
Linux_musl_arm64:
43+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-20210719121212-b2c2436
44+
env:
45+
ROOTFS_DIR: /crossrootfs/arm64
446

5-
resources:
6-
containers:
7-
- container: Linux_arm
8-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm-20220907130538-70ed2e8
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-20211208135931-e6e3ac4
14-
env:
15-
ROOTFS_DIR: /crossrootfs/armv6
16-
17-
- container: Linux_arm64
18-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-20210719121212-8a8d3be
19-
env:
20-
ROOTFS_DIR: /crossrootfs/arm64
21-
22-
- container: Linux_musl_x64
23-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-WithNode-20210910135845-c401c85
24-
25-
- container: Linux_musl_arm
26-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm-alpine-20220915134743-78f7860
27-
env:
28-
ROOTFS_DIR: /crossrootfs/arm
29-
30-
- container: Linux_musl_arm64
31-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-20210719121212-b2c2436
32-
env:
33-
ROOTFS_DIR: /crossrootfs/arm64
3447
# This container contains all required toolsets to build for Android and for Linux with bionic libc.
48+
Linux_bionic:
49+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-android-20200422191843-e2c3f83
3550

36-
- container: Linux_bionic
37-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-android-20200422191843-e2c3f83
51+
Linux_x64:
52+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-20210714125435-9b5bbc2
3853

39-
- container: Linux_x64
40-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-20210714125435-9b5bbc2
54+
Linux_x86:
55+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-x86-linux-20211022152824-f853169
56+
env:
57+
ROOTFS_DIR: /crossrootfs/x86
4158

42-
- container: Linux_x86
43-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-x86-linux-20211022152824-f853169
44-
env:
45-
ROOTFS_DIR: /crossrootfs/x86
59+
SourceBuild_Linux_x64:
60+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-source-build-20210714125450-5d87b80
4661

47-
- container: SourceBuild_Linux_x64
48-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-source-build-20210714125450-5d87b80
62+
Linux_s390x:
63+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-s390x-20201102145728-d6e0352
64+
env:
65+
ROOTFS_DIR: /crossrootfs/s390x
4966

50-
- container: Linux_s390x
51-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-s390x-20201102145728-d6e0352
52-
env:
53-
ROOTFS_DIR: /crossrootfs/s390x
67+
Linux_ppc64le:
68+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-ppc64le-20220531132048-b9de666
69+
env:
70+
ROOTFS_DIR: /crossrootfs/ppc64le
5471

55-
- container: Linux_ppc64le
56-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-ppc64le-20220531132048-b9de666
57-
env:
58-
ROOTFS_DIR: /crossrootfs/ppc64le
72+
Browser_wasm:
73+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-webassembly-20210531091624-f5c7a43
5974

60-
- container: Browser_wasm
61-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-webassembly-20210531091624-f5c7a43
75+
FreeBSD_x64:
76+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-freebsd-12-20210917001307-f13d79e
77+
env:
78+
ROOTFS_DIR: /crossrootfs/x64
6279

63-
- container: FreeBSD_x64
64-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-freebsd-12-20210917001307-f13d79e
65-
env:
66-
ROOTFS_DIR: /crossrootfs/x64
80+
Tizen_armel:
81+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-armel-tizen-20210719212651-8b02f56
82+
env:
83+
ROOTFS_DIR: /crossrootfs/armel
6784

68-
- container: Tizen_armel
69-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-armel-tizen-20210719212651-8b02f56
70-
env:
71-
ROOTFS_DIR: /crossrootfs/armel
85+
debpkg:
86+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-debpkg-20220504035737-cfdd435
7287

73-
- container: debpkg
74-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-debpkg-20220504035737-cfdd435
75-
76-
- container: rpmpkg
77-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-rpmpkg-20210714125410-daa5116
78-
79-
stages: ${{ parameters.stages }}
88+
rpmpkg:
89+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-rpmpkg-20210714125410-daa5116
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 & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ parameters:
2323
runtimeVariant: ''
2424
dependsOn: []
2525
dependOnEvaluatePaths: false
26+
isOfficialBuild: false
2627

2728
### Build managed test components (native components are getting built as part
2829
### of the the product build job).
@@ -161,10 +162,12 @@ jobs:
161162

162163

163164
# Publish Logs
164-
- task: PublishPipelineArtifact@1
165-
displayName: Publish Logs
166-
inputs:
167-
targetPath: $(Build.SourcesDirectory)/artifacts/log
168-
artifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_AnyOS_AnyCPU_$(buildConfig)_Lib${{ parameters.liveLibrariesBuildConfig }}_${{ parameters.testGroup }}'
169-
continueOnError: true
170-
condition: always()
165+
- template: /eng/pipelines/common/templates/publish-pipeline-artifacts.yml
166+
parameters:
167+
displayName: Publish Logs
168+
isOfficialBuild: ${{ parameters.isOfficialBuild }}
169+
inputs:
170+
targetPath: $(Build.SourcesDirectory)/artifacts/log
171+
ArtifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_Attempt$(System.JobAttempt)_AnyOS_AnyCPU_$(buildConfig)_${{ parameters.testGroup }}'
172+
continueOnError: true
173+
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
timeoutInMinutes: ''
2121
enableMicrobuild: ''
2222
gatherAssetManifests: 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 }}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
3+
parameters:
4+
- name: templatePath
5+
type: string
6+
default: 'templates-official'
7+
- name: stages
8+
type: stageList
9+
- name: containers
10+
type: object
11+
12+
13+
resources:
14+
repositories:
15+
- repository: 1ESPipelineTemplates
16+
type: git
17+
name: 1ESPipelineTemplates/1ESPipelineTemplates
18+
ref: refs/tags/release
19+
20+
extends:
21+
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
22+
parameters:
23+
pool:
24+
name: NetCore1ESPool-Svc-Internal
25+
image: 1es-windows-2022
26+
os: windows
27+
28+
containers:
29+
${{ parameters.containers }}
30+
31+
stages: ${{ parameters.stages }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
parameters:
2+
- name: templatePath
3+
type: string
4+
- name: stages
5+
type: stageList
6+
- name: containers
7+
type: object
8+
9+
extends:
10+
template: ${{ parameters.templatePath }}
11+
parameters:
12+
stages: ${{ parameters.stages }}
13+
containers: ${{ parameters.containers }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
parameters:
3+
- name: templatePath
4+
type: string
5+
default: 'templates'
6+
- name: stages
7+
type: stageList
8+
- name: containers
9+
type: object
10+
11+
resources:
12+
containers:
13+
- ${{ each container_pair in parameters.containers }}:
14+
- ${{ if container_pair.value.image }}:
15+
- container: ${{ container_pair.key }}
16+
${{ each pair in container_pair.value }}:
17+
${{ if notIn(pair.key, 'tenantId', 'identityType', 'registry') }}:
18+
${{ pair.key }}: ${{ pair.value }}
19+
20+
21+
stages: ${{ parameters.stages }}

eng/pipelines/common/upload-artifact-step.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ parameters:
66
archiveExtension: ''
77
artifactName: ''
88
displayName: ''
9+
isOfficialBuild: false
910

1011
steps:
1112
# Zip Artifact
@@ -18,8 +19,11 @@ steps:
1819
tarCompression: ${{ parameters.tarCompression }}
1920
includeRootFolder: ${{ parameters.includeRootFolder }}
2021

21-
- task: PublishBuildArtifacts@1
22-
displayName: 'Publish ${{ parameters.displayName }}'
23-
inputs:
24-
pathtoPublish: $(Build.StagingDirectory)/${{ parameters.artifactName }}${{ parameters.archiveExtension }}
25-
artifactName: ${{ parameters.artifactName }}
22+
- template: /eng/pipelines/common/templates/publish-build-artifacts.yml
23+
parameters:
24+
isOfficialBuild: ${{ parameters.isOfficialBuild }}
25+
displayName: 'Publish ${{ parameters.displayName }}'
26+
inputs:
27+
PathtoPublish: $(Build.StagingDirectory)/${{ parameters.artifactName }}${{ parameters.archiveExtension }}
28+
artifactName: ${{ parameters.artifactName }}
29+
condition: ${{ parameters.condition }}

0 commit comments

Comments
 (0)