Skip to content

Commit 6b78906

Browse files
authored
Add installer build/test to the runtime.yml pipeline (#705)
* First pass to get an installer build integrated into runtime.yml with minimal changes to the installer jobs. Fix paths to jobs. Fix typos Add platform to parameter lists. Pass platform to all jobs. Cleanup variable usages. Don't pass buildConfig down to installer jobs. They use matrix strategy instead. Fix variable usage in windows build. Fix windows platform names. Add missing platform parameter for Windows_NT_arm Update last condition re parameters.dockerImage. Rename dockerImage parameter to productBuildDockerImage to be more explicit. Use pool and container parameters from platform-matrix in installer build. Pass rootfs dir via crossrootfsDir to bash-build.yml. Fix passing down container in runtime-installer pipeline. Remove unused Linux_x64_raw config. * Add support for clang 9 to corehost build. * Skip tests on Linux_musl_arm64 * runtime.yml installer build with live artifacts Includes refactoring the runtime legs to avoid duplicating artifact transfer logic and preserve the runtime standalone build. * Fix installer overrides: accept live CI artifacts * Use clone-checkout-bundle-step.yml everywhere * Try using isOfficialBuild var from template expr * Switch from $[] to $() to fix clone template $[] becomes empty string when a variable is undefined. $() sticks around literally if the variable doesn't exist, messing up the command. Unfortunately $[] doesn't seem to work in this context so we must use $() and define the variable as empty string.
1 parent 7269776 commit 6b78906

23 files changed

+573
-458
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
steps:
2+
- checkout: none
3+
clean: true
4+
5+
- download: current
6+
artifact: Checkout_bundle
7+
displayName: Download Checkout.bundle
8+
9+
- script: |
10+
$(setScriptToEchoAndFailOnNonZero)
11+
git clone $(Pipeline.Workspace)/Checkout_bundle/Checkout.bundle .
12+
git remote set-url origin $(Build.Repository.Uri)
13+
displayName: Clone the repository from Checkout.bundle

eng/pipelines/common/platform-matrix.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ jobs:
135135
managedTestBuildOsGroup: OSX
136136
${{ insert }}: ${{ parameters.jobParameters }}
137137

138+
# WebAssembly
139+
138140
- ${{ if containsValue(parameters.platforms, 'WebAssembly_wasm') }}:
139141
- template: xplat-setup.yml
140142
parameters:

eng/pipelines/common/variables.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
variables:
2+
- name: isOfficialBuild
3+
value: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}

eng/pipelines/common/xplat-setup.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
value: '\'
2626
- name: _msbuildCommand
2727
value: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 -warnaserror:0 -ci
28+
- name: setScriptToEchoAndFailOnNonZero
29+
value: ''
2830

2931
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
3032
- name: archiveExtension
@@ -39,7 +41,10 @@ jobs:
3941
value: '/'
4042
- name: _msbuildCommand
4143
value: ./eng/common/msbuild.sh --warnaserror false --ci
42-
44+
# Set the bash script to display each command, and stop if any command exits nonzero.
45+
- name: setScriptToEchoAndFailOnNonZero
46+
value: 'set -xe'
47+
4348
- ${{ if ne(parameters.jobParameters.crossrootfsDir, '') }}:
4449
# This is only required for cross builds.
4550
- name: ROOTFS_DIR
@@ -48,6 +53,7 @@ jobs:
4853
osGroup: ${{ parameters.osGroup }}
4954
osSubgroup: ${{ parameters.osSubgroup }}
5055
archType: ${{ parameters.archType }}
56+
platform: ${{ parameters.platform }}
5157

5258
${{ if ne(parameters.container, '') }}:
5359
${{ if eq(parameters.container.registry, 'mcr') }}:
@@ -94,4 +100,3 @@ jobs:
94100
${{ if ne(parameters.helixQueuesTemplate, '') }}:
95101
jobTemplate: ${{ parameters.jobTemplate }}
96102
jobParameters: ${{ parameters.jobParameters }}
97-
platform: ${{ parameters.platform }}

eng/pipelines/coreclr/templates/xplat-job.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,6 @@ jobs:
121121
- ${{insert}}: ${{ variable }}
122122

123123
steps:
124-
- checkout: none
125-
clean: true
126-
127-
- download: current
128-
artifact: Checkout_bundle
129-
displayName: Download Checkout.bundle
130-
131-
- script: |
132-
git clone $(Pipeline.Workspace)/Checkout_bundle/Checkout.bundle .
133-
git remote set-url origin $(Build.Repository.Uri)
134-
displayName: Clone the repository from Checkout.bundle
124+
- template: /eng/pipelines/common/clone-checkout-bundle-step.yml
135125

136126
- ${{ parameters.steps }}

eng/pipelines/installer/azure-pipelines.yml

Lines changed: 17 additions & 213 deletions
Original file line numberDiff line numberDiff line change
@@ -44,216 +44,20 @@ pr:
4444

4545
name: $(Date:yyyyMMdd)$(Rev:.r)
4646

47-
variables:
48-
- name: TeamName
49-
value: dotnet-core-acquisition
50-
# Skip Running CI tests
51-
- name: SkipTests
52-
value: false
53-
# Set Official Build Id
54-
- name: OfficialBuildId
55-
value: $(Build.BuildNumber)
56-
57-
# Set the target blob feed for package publish during official and validation builds.
58-
- name: _DotNetArtifactsCategory
59-
value: .NETCore
60-
- name: _DotNetValidationArtifactsCategory
61-
value: .NETCoreValidation
62-
63-
# Produce test-signed build for PR and Public builds
64-
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
65-
- name: SignType
66-
value: test
67-
68-
# Set up non-PR build from internal project
69-
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
70-
- name: SignType
71-
value: $[ coalesce(variables.OfficialSignType, 'real') ]
72-
# Values for SDLValidationParameters
73-
- group: core-setup-sdl-validation
74-
75-
- name: pipelinesPath
76-
value: /eng/pipelines/installer
77-
- name: buildScriptFileName
78-
value: installer
79-
80-
stages:
81-
- stage: Build
82-
jobs:
83-
# -------- Build Bash legs (Linux and FreeBSD) --------
84-
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
85-
parameters:
86-
crossBuild: true
87-
name: Linux_Arm
88-
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-14.04-23cacb0-20190923200213
89-
additionalRunArgs: -e ROOTFS_DIR=/crossrootfs/arm
90-
portableBuild: true
91-
skipTests: true
92-
targetArchitecture: arm
93-
94-
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
95-
parameters:
96-
crossBuild: true
97-
name: Linux_Arm64
98-
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-cfdd435-20190923200213
99-
additionalRunArgs: -e ROOTFS_DIR=/crossrootfs/arm64
100-
portableBuild: true
101-
skipTests: true
102-
targetArchitecture: arm64
103-
104-
# # Tizen build only for PR build
105-
# - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
106-
# - template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
107-
# parameters:
108-
# additionalMSBuildArgs: /p:OverridePackageSource=https:%2F%2Ftizen.myget.org/F/dotnet-core/api/v3/index.json /p:OutputRid=tizen.5.0.0-armel
109-
# additionalRunArgs: -e ROOTFS_DIR=/crossrootfs/armel.tizen.build
110-
# crossBuild: true
111-
# name: Linux_ArmRel_Tizen
112-
# disableCrossgen: true
113-
# dockerImage: tizendotnet/dotnet-buildtools-prereqs:ubuntu-16.04-cross-e435274-20180426002255-tizen-rootfs-5.0m1
114-
# portableBuild: false
115-
# skipTests: true
116-
# targetArchitecture: armel
117-
118-
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
119-
parameters:
120-
additionalMSBuildArgs: /p:OutputRid=linux-musl-arm64
121-
crossBuild: true
122-
name: Linux_Arm64_Alpine37
123-
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-406629a-20190923200213
124-
additionalRunArgs: -e ROOTFS_DIR=/crossrootfs/arm64
125-
portableBuild: false
126-
skipTests: true
127-
targetArchitecture: arm64
128-
129-
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
130-
parameters:
131-
additionalMSBuildArgs: /p:OutputRid=linux-musl-x64
132-
name: Linux_x64_Alpine39
133-
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-WithNode-0fc54a3-20190918214015
134-
portableBuild: false
135-
targetArchitecture: x64
136-
137-
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
138-
parameters:
139-
name: Linux_x64_glibc
140-
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-50f0d02-20190918214028
141-
packageDistroList:
142-
- image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-14.04-debpkg-e5cf912-20175003025046
143-
imageRid: ubuntu.14.04
144-
rids: []
145-
- image: mcr.microsoft.com/dotnet-buildtools/prereqs:rhel-7-rpmpkg-c982313-20174116044113
146-
imageRid: rhel.7
147-
rids:
148-
- centos.7
149-
- fedora.27
150-
- opensuse.42
151-
- oraclelinux.7
152-
- sles.12
153-
portableBuild: true
154-
targetArchitecture: x64
155-
156-
# -------- Build OSX (macOS) leg --------
157-
- template: ${{ variables['pipelinesPath'] }}/jobs/osx-build.yml
158-
parameters:
159-
name: OSX
160-
161-
# -------- Build Windows legs --------
162-
# Windows Arm
163-
- template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml
164-
parameters:
165-
name: Windows_Arm
166-
skipTests: true
167-
targetArchitecture: arm
168-
169-
# Windows Arm64
170-
- template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml
171-
parameters:
172-
name: Windows_Arm64
173-
skipTests: true
174-
targetArchitecture: arm64
175-
176-
# Windows x64
177-
- template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml
178-
parameters:
179-
name: Windows_x64
180-
publishRidAgnosticPackages: true
181-
targetArchitecture: x64
182-
183-
# Windows x86
184-
- template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml
185-
parameters:
186-
name: Windows_x86
187-
targetArchitecture: x86
188-
189-
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
190-
- stage: PrepareForPublish
191-
displayName: Prepare for Publish
192-
dependsOn: Build
193-
jobs:
194-
# Prep artifacts: sign them and upload pipeline artifacts expected by stages-based publishing.
195-
- template: ${{ variables['pipelinesPath'] }}/jobs/prepare-signed-artifacts.yml
196-
parameters:
197-
PublishRidAgnosticPackagesFromJobName: Windows_x64
198-
# Publish to Build Asset Registry in order to generate the ReleaseConfigs artifact.
199-
- template: /eng/common/templates/job/publish-build-assets.yml
200-
parameters:
201-
publishUsingPipelines: true
202-
dependsOn: PrepareSignedArtifacts
203-
pool:
204-
name: NetCoreInternal-Pool
205-
queue: buildpool.windows.10.amd64.vs2017
206-
207-
- template: ${{ variables['pipelinesPath'] }}/stages/publish.yml
208-
parameters:
209-
pipelinesPath: ${{ variables['pipelinesPath'] }}
210-
# Publish channel configuration. The publish template wraps Arcade publishing and adds some
211-
# extras that aren't implemented in Arcade yet.
212-
#
213-
# - dependsOn: <ID of the Arcade stage that finalization should run after>
214-
# channel:
215-
# name: <Name of this channel, for logging and readability>
216-
# bar: <Name of the Arcade variable that contains the ID of this channel in BAR>
217-
# storage: <Name of the Latest channel to publish to in dotnetcli blob storage>
218-
dependsOnPublishStages:
219-
220-
- dependsOn: NetCore_Release30_Publish
221-
channel:
222-
name: .NET Core 3 Release
223-
bar: PublicRelease_30_Channel_Id
224-
storage: release/3.0-preview9
225-
public: true
226-
- dependsOn: NetCore_30_Internal_Servicing_Publishing
227-
channel:
228-
name: .NET Core 3 Internal Servicing
229-
bar: InternalServicing_30_Channel_Id
230-
storage: internal/release/3.0
231-
public: false
232-
233-
- dependsOn: NetCore_Dev31_Publish
234-
channel:
235-
name: .NET Core 3.1 Dev
236-
bar: PublicDevRelease_31_Channel_Id
237-
storage: release/3.1
238-
public: true
239-
240-
- dependsOn: NetCore_Release31_Publish
241-
channel:
242-
name: .NET Core 3.1 Release
243-
bar: PublicRelease_31_Channel_Id
244-
storage: release/3.1-preview1
245-
public: true
246-
247-
- dependsOn: NetCore_Dev5_Publish
248-
channel:
249-
name: .NET Core 5 Dev
250-
bar: NetCore_5_Dev_Channel_Id
251-
storage: master
252-
public: true
253-
254-
- dependsOn: PVR_Publish
255-
channel:
256-
name: .NET Tools - Validation
257-
bar: NetCore_Tools_Validation_Channel_Id
258-
storage: dev/validation
259-
public: true
47+
jobs:
48+
#
49+
# Checkout repository
50+
#
51+
- template: /eng/pipelines/common/checkout-job.yml
52+
53+
#
54+
# Build and Test
55+
#
56+
- template: /eng/pipelines/installer/installer-matrix.yml
57+
parameters:
58+
strategy:
59+
matrix:
60+
debug:
61+
_BuildConfig: Debug
62+
release:
63+
_BuildConfig: Release

0 commit comments

Comments
 (0)