Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 9e6766a

Browse files
authored
Backport pipeline changes (#8780)
* Backport changes to get CI working in runtime repository. * /root/coresetup->/root/runtime * Delete broken RPM symlink that might still be around if the RPM packaging job failed. * Add back old Documentation folder excludes with a more specific include for the manpages folder. * Try other variable format for template path. * Treat subsetArg as a parameter with a default value instead of as a variable. * Pass subset arg to template. * Try other variable format. * Try another variant. * Switch back variable format now that I got a different (seemingly actionable) error. * Fix passing the subset arg.
1 parent ee998f6 commit 9e6766a

File tree

9 files changed

+79
-33
lines changed

9 files changed

+79
-33
lines changed

azure-pipelines.yml

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
trigger:
2-
batch: true
32
branches:
43
include:
54
- master
65
- release/3.*
76
paths:
7+
include:
8+
- '*'
9+
- docs/installer/manpages/*
10+
- Documentation/manpages/*
811
exclude:
912
- Documentation/*
13+
- src/coreclr/*
14+
- src/libraries/*
15+
- eng/pipelines/coreclr/*
16+
- eng/pipelines/libraries/*
17+
- docs/*
1018
- README.md
1119
- CONTRIBUTING.md
1220
- LICENSE.TXT
@@ -18,8 +26,17 @@ pr:
1826
- master
1927
- release/3.*
2028
paths:
29+
include:
30+
- '*'
31+
- docs/installer/manpages/*
32+
- Documentation/manpages/*
2133
exclude:
2234
- Documentation/*
35+
- src/coreclr/*
36+
- src/libraries/*
37+
- eng/pipelines/coreclr/*
38+
- eng/pipelines/libraries/*
39+
- docs/*
2340
- README.md
2441
- CONTRIBUTING.md
2542
- LICENSE.TXT
@@ -53,11 +70,22 @@ variables:
5370
- name: SignType
5471
value: $[ coalesce(variables.OfficialSignType, 'real') ]
5572

73+
- ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}:
74+
- name: pipelinesPath
75+
value: /eng/pipelines/installer
76+
- name: buildScriptFileName
77+
value: installer
78+
- ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}:
79+
- name: pipelinesPath
80+
value: /eng/pipelines
81+
- name: buildScriptFileName
82+
value: build
83+
5684
stages:
5785
- stage: Build
5886
jobs:
5987
# -------- Build Bash legs (Linux and FreeBSD) --------
60-
- template: /eng/pipelines/jobs/bash-build.yml
88+
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
6189
parameters:
6290
crossBuild: true
6391
name: Linux_Arm
@@ -67,7 +95,7 @@ stages:
6795
skipTests: true
6896
targetArchitecture: arm
6997

70-
- template: /eng/pipelines/jobs/bash-build.yml
98+
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
7199
parameters:
72100
crossBuild: true
73101
name: Linux_Arm64
@@ -79,7 +107,7 @@ stages:
79107

80108
# # Tizen build only for PR build
81109
# - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
82-
# - template: /eng/pipelines/jobs/bash-build.yml
110+
# - template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
83111
# parameters:
84112
# additionalMSBuildArgs: /p:OverridePackageSource=https:%2F%2Ftizen.myget.org/F/dotnet-core/api/v3/index.json /p:OutputRid=tizen.5.0.0-armel
85113
# additionalRunArgs: -e ROOTFS_DIR=/crossrootfs/armel.tizen.build
@@ -91,7 +119,7 @@ stages:
91119
# skipTests: true
92120
# targetArchitecture: armel
93121

94-
- template: /eng/pipelines/jobs/bash-build.yml
122+
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
95123
parameters:
96124
additionalMSBuildArgs: /p:OutputRid=linux-musl-arm64
97125
crossBuild: true
@@ -102,15 +130,15 @@ stages:
102130
skipTests: true
103131
targetArchitecture: arm64
104132

105-
- template: /eng/pipelines/jobs/bash-build.yml
133+
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
106134
parameters:
107135
additionalMSBuildArgs: /p:OutputRid=linux-musl-x64
108136
name: Linux_x64_Alpine39
109137
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-WithNode-0fc54a3-20190918214015
110138
portableBuild: false
111139
targetArchitecture: x64
112140

113-
- template: /eng/pipelines/jobs/bash-build.yml
141+
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
114142
parameters:
115143
name: Linux_x64_glibc
116144
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-50f0d02-20190918214028
@@ -129,7 +157,7 @@ stages:
129157
portableBuild: true
130158
targetArchitecture: x64
131159

132-
- template: /eng/pipelines/jobs/bash-build.yml
160+
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
133161
parameters:
134162
additionalMSBuildArgs: /p:OutputRid=rhel.6-x64
135163
name: Linux_x64_Rhel6
@@ -138,34 +166,34 @@ stages:
138166
targetArchitecture: x64
139167

140168
# -------- Build OSX (macOS) leg --------
141-
- template: /eng/pipelines/jobs/osx-build.yml
169+
- template: ${{ variables['pipelinesPath'] }}/jobs/osx-build.yml
142170
parameters:
143171
name: OSX
144172

145173
# -------- Build Windows legs --------
146174
# Windows Arm
147-
- template: /eng/pipelines/jobs/windows-build.yml
175+
- template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml
148176
parameters:
149177
name: Windows_Arm
150178
skipTests: true
151179
targetArchitecture: arm
152180

153181
# Windows Arm64
154-
- template: /eng/pipelines/jobs/windows-build.yml
182+
- template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml
155183
parameters:
156184
name: Windows_Arm64
157185
skipTests: true
158186
targetArchitecture: arm64
159187

160188
# Windows x64
161-
- template: /eng/pipelines/jobs/windows-build.yml
189+
- template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml
162190
parameters:
163191
name: Windows_x64
164192
publishRidAgnosticPackages: true
165193
targetArchitecture: x64
166194

167195
# Windows x86
168-
- template: /eng/pipelines/jobs/windows-build.yml
196+
- template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml
169197
parameters:
170198
name: Windows_x86
171199
targetArchitecture: x86
@@ -176,7 +204,7 @@ stages:
176204
dependsOn: Build
177205
jobs:
178206
# Prep artifacts: sign them and upload pipeline artifacts expected by stages-based publishing.
179-
- template: /eng/pipelines/jobs/prepare-signed-artifacts.yml
207+
- template: ${{ variables['pipelinesPath'] }}/jobs/prepare-signed-artifacts.yml
180208
parameters:
181209
PublishRidAgnosticPackagesFromJobName: Windows_x64
182210
# Publish to Build Asset Registry in order to generate the ReleaseConfigs artifact.
@@ -188,7 +216,7 @@ stages:
188216
name: NetCoreInternal-Pool
189217
queue: buildpool.windows.10.amd64.vs2017
190218

191-
- template: /eng/pipelines/stages/publish.yml
219+
- template: ${{ variables['pipelinesPath'] }}/stages/publish.yml
192220
parameters:
193221
# Publish channel configuration. The publish template wraps Arcade publishing and adds some
194222
# extras that aren't implemented in Arcade yet.

eng/pipelines/jobs/bash-build.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040
${{ if ne(parameters.name, 'FreeBSD_x64')}}:
4141
RunArguments: >-
4242
docker run --privileged --rm
43-
-v "$(Build.SourcesDirectory):/root/coresetup"
44-
-w="/root/coresetup"
43+
-v "$(Build.SourcesDirectory):/root/runtime"
44+
-w="/root/runtime"
4545
$(PreserveNuGetAuthDockerArgs)
4646
${{ parameters.additionalRunArgs }}
4747
${{ parameters.dockerImage }}
@@ -50,12 +50,15 @@ jobs:
5050
RunArguments: export DotNetBootstrapCliTarPath=/dotnet-sdk-freebsd-x64.tar &&
5151

5252
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
53-
BuildScript: ./eng/install-nuget-credprovider-then-build.sh
54-
MSBuildScript: /root/coresetup/eng/install-nuget-credprovider-then-msbuild.sh
53+
${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}:
54+
BuildScript: ./eng/install-nuget-credprovider-then-build.sh
55+
${{ if contains(variables['Build.DefinitionName'], 'runtime') }}:
56+
BuildScript: ./eng/install-nuget-credprovider-then-build.sh --subsetCategory installer
57+
MSBuildScript: /root/runtime/eng/install-nuget-credprovider-then-msbuild.sh
5558

5659
${{ if not(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'))) }}:
57-
BuildScript: ./build.sh
58-
MSBuildScript: /root/coresetup/eng/common/msbuild.sh
60+
BuildScript: ./$(buildScriptFileName).sh
61+
MSBuildScript: /root/runtime/eng/common/msbuild.sh
5962

6063
CommonMSBuildArgs: >-
6164
/p:Configuration=$(_BuildConfig)
@@ -89,11 +92,16 @@ jobs:
8992
9093
DockerRunMSBuild: >-
9194
docker run
92-
-v $(Build.SourcesDirectory):/root/coresetup
95+
-v $(Build.SourcesDirectory):/root/runtime
9396
-v $(Build.StagingDirectory)/sharedFrameworkPublish/:/root/sharedFrameworkPublish/
94-
-w=/root/coresetup
97+
-w=/root/runtime
9598
$(PreserveNuGetAuthDockerArgs)
9699
100+
${{ if contains(variables['Build.DefinitionName'], 'runtime') }}:
101+
installersSubsetArg: --subset Installers
102+
${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}:
103+
installersSubsetArg: /p:Subset=Installer
104+
97105
steps:
98106

99107
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
@@ -139,6 +147,7 @@ jobs:
139147
distroRid: ${{ packageBuild.imageRid }}
140148
image: ${{ packageBuild.image }}
141149
packageStepDescription: Runtime Deps, Runtime, Framework Packs installers
150+
subsetArg: $(installersSubsetArg)
142151

143152
- ${{ each rid in packageBuild.rids }}:
144153
# Build distro-dependent packages.
@@ -149,6 +158,7 @@ jobs:
149158
outputRidArg: /p:OutputRid=${{ rid }}-${{ parameters.targetArchitecture }}
150159
packageStepDescription: Runtime Deps installers
151160
packagingArgs: /p:BuildDistroIndependentInstallers=false
161+
subsetArg: $(installersSubsetArg)
152162

153163
# Files may be owned by root because builds don't set user ID. The next AzDO step runs 'find' in
154164
# the source tree, which fails due to permissions in the 'NetCore*-Int-Pool' queues. This step

eng/pipelines/jobs/osx-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- task: NuGetAuthenticate@0
2727

2828
- script: >-
29-
$(Build.SourcesDirectory)/build.sh --ci --test
29+
$(Build.SourcesDirectory)/$(buildScriptFileName).sh --ci --test
3030
/p:OfficialBuildId=$(OfficialBuildId)
3131
/p:StripSymbols=true
3232
$(CommonMSBuildArgs)

eng/pipelines/jobs/steps/build-linux-package.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ parameters:
55
outputRidArg: ''
66
packageStepDescription: null
77
packagingArgs: ''
8+
subsetArg: ''
89

910
steps:
1011
- ${{ if eq(parameters.buildTraversalBuildDependencies, true) }}:
@@ -13,7 +14,7 @@ steps:
1314
df -h
1415
$(DockerRunMSBuild) ${{ parameters.image }} $(MSBuildScript) \
1516
--ci \
16-
/root/coresetup/tools-local/tasks/installer.tasks/installer.tasks.csproj \
17+
/root/runtime/tools-local/tasks/installer.tasks/installer.tasks.csproj \
1718
/t:Restore /t:Build /t:CreateHostMachineInfoFile \
1819
$(CommonMSBuildArgs) \
1920
/bl:msbuild.${{ parameters.distroRid }}.traversaldependencies.binlog
@@ -24,12 +25,12 @@ steps:
2425
df -h
2526
$(DockerRunMSBuild) ${{ parameters.image }} $(BuildScript) \
2627
--ci \
27-
/p:Subset=Installer \
28+
${{ parameters.subsetArg }} \
2829
/p:UsePrebuiltPortableBinariesForInstallers=true \
2930
$(PackagePortableBitsArgs) \
3031
/p:GenerateProjectInstallers=true \
3132
${{ parameters.packagingArgs }} \
3233
$(CommonMSBuildArgs) \
3334
${{ parameters.outputRidArg }} \
34-
/bl:msbuild.${{ parameters.distroRid }}.installers.binlog
35+
/bl:artifacts/log/$(_BuildConfig)/msbuild.${{ parameters.distroRid }}.installers.binlog
3536
displayName: Package ${{ parameters.packageStepDescription }} - ${{ parameters.distroRid }}

eng/pipelines/jobs/steps/upload-job-artifacts.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ steps:
3535
continueOnError: true
3636
condition: always()
3737

38+
- task: DeleteFiles@1
39+
displayName: Delete broken symlinks.
40+
inputs:
41+
SourceFolder: '$(Build.SourcesDirectory)'
42+
Contents: artifacts/obj/rhel.7-x64.Debug/packages/dotnet-host/5.0.0/rpmLayoutDirectory/package_root/usr/bin/dotnet
43+
condition: succeededOrFailed()
44+
3845
- task: CopyFiles@2
3946
displayName: Prepare BuildLogs staging directory
4047
inputs:

eng/pipelines/jobs/windows-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
displayName: Clear NuGet http cache (if exists)
5959

6060
- script: >-
61-
build.cmd -ci -test
61+
$(buildScriptFileName).cmd -ci -test
6262
$(CommonMSBuildArgs)
6363
$(MsbuildSigningArguments)
6464
displayName: Build

eng/pipelines/stages/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ stages:
4040
variables:
4141
- template: /eng/common/templates/post-build/common-variables.yml
4242
jobs:
43-
- template: /eng/pipelines/jobs/run-publish-project.yml
43+
- template: $(pipelinesPath)/jobs/run-publish-project.yml
4444
parameters:
4545
projectName: publish-final
4646
dependency: ${{ dependency }}

src/corehost/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ if [ $__CrossBuild == 1 ]; then
268268
fi
269269
export TARGET_BUILD_ARCH=$__build_arch_lowcase
270270
export __DistroRid=$__rid_plat
271-
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_HOST_VER=$__host_ver -DCLI_CMAKE_COMMON_HOST_VER=$__apphost_ver -DCLI_CMAKE_HOST_FXR_VER=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER=$__policy_ver -DCLI_CMAKE_PKG_RID=$__base_rid -DCLI_CMAKE_COMMIT_HASH=$__commit_hash -DCMAKE_INSTALL_PREFIX=$__cmake_bin_prefix -DCMAKE_TOOLCHAIN_FILE=$DIR/../../cross/toolchain.cmake
271+
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_HOST_VER=$__host_ver -DCLI_CMAKE_COMMON_HOST_VER=$__apphost_ver -DCLI_CMAKE_HOST_FXR_VER=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER=$__policy_ver -DCLI_CMAKE_PKG_RID=$__base_rid -DCLI_CMAKE_COMMIT_HASH=$__commit_hash -DCMAKE_INSTALL_PREFIX=$__cmake_bin_prefix -DCMAKE_TOOLCHAIN_FILE=$RootRepo/cross/toolchain.cmake
272272
else
273273
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_HOST_VER=$__host_ver -DCLI_CMAKE_COMMON_HOST_VER=$__apphost_ver -DCLI_CMAKE_HOST_FXR_VER=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER=$__policy_ver -DCLI_CMAKE_PKG_RID=$__base_rid -DCLI_CMAKE_COMMIT_HASH=$__commit_hash -DCMAKE_INSTALL_PREFIX=$__cmake_bin_prefix
274274
fi

src/signing/Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
<PropertyGroup>
66
<TargetFramework>$(NETCoreAppFramework)</TargetFramework>
7+
<IsRuntimeRepository Condition="Exists('$(MSBuildThisFileDirectory)..\..\..\.dotnet-runtime-placeholder')">true</IsRuntimeRepository>
78

8-
<!-- Skip signing steps by default for non-official builds. -->
9-
<SkipSigning Condition="'$(SkipSigning)' == '' and '$(OfficialBuild)' != 'true'">true</SkipSigning>
9+
<!-- Skip signing steps by default for non-official builds. Skip signing in the runtime repository until we onboard unified signing scripts. -->
10+
<SkipSigning Condition="('$(SkipSigning)' == '' and '$(OfficialBuild)' != 'true') or '$(IsRuntimeRepository)' == 'true'">true</SkipSigning>
1011
</PropertyGroup>
11-
1212
</Project>

0 commit comments

Comments
 (0)