Split current CI pipline (#17370)

This commit is contained in:
Ella Hathaway 2023-11-07 08:54:50 -08:00 committed by GitHub
parent 7ac1022e78
commit eefba512e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 143 additions and 92 deletions

View file

@ -21,6 +21,10 @@ parameters:
- name: architecture
type: string
- name: artifactsRid
type: string
default: ''
- name: container
type: string
@ -141,17 +145,25 @@ jobs:
- script: |
set -euo pipefail
if [[ '${{ parameters.artifactsRid }}' == '' ]]; then
echo "'artifactsRid' is not specified. Cannot download source-built SDK."
exit 1
fi
packageVersionsPath="${{ variables.sourcesPath }}/eng/Versions.props"
notFoundMessage="No source-built SDK found to download..."
echo "Looking for source-built SDK to download..."
archiveUrlLine=`grep -m 1 "<PrivateSourceBuiltSdkUrl_CentOS8Stream>" "$packageVersionsPath" || :`
urlPattern="<PrivateSourceBuiltSdkUrl_CentOS8Stream>(.*)</PrivateSourceBuiltSdkUrl_CentOS8Stream>"
archiveVersionLine=$(grep -m 1 "<PrivateSourceBuiltSdkVersion>" "$packageVersionsPath" || :)
versionPattern="<PrivateSourceBuiltSdkVersion>(.*)</PrivateSourceBuiltSdkVersion>"
if [[ $archiveUrlLine =~ $urlPattern ]]; then
archiveUrl="${BASH_REMATCH[1]}"
if [[ $archiveVersionLine =~ $versionPattern ]]; then
archiveVersion="${BASH_REMATCH[1]}"
archiveUrl="https://dotnetcli.azureedge.net/source-built-artifacts/sdks/dotnet-sdk-$archiveVersion-${{ parameters.artifactsRid }}.tar.gz"
downloadDir="$(sourcesPath)/prereqs/packages/archive/"
(cd $downloadDir && curl --retry 5 -O $archiveUrl)
echo "Downloading source-built SDK from $archiveUrl..."
(cd "$downloadDir" && curl --retry 5 -O "$archiveUrl")
else
echo "$notFoundMessage"
exit 1
@ -163,8 +175,13 @@ jobs:
customPrepArgs=""
prepSdk=true
if [[ -n '${{ parameters.artifactsRid }}' ]]; then
customPrepArgs="${customPrepArgs} --artifacts-rid ${{ parameters.artifactsRid }}"
fi
if [[ '${{ parameters.withPreviousSDK }}' == 'True' ]]; then
# Source-built artifacts are from CentOS 8 Stream. We want to download them without
# Source-built artifacts are from CentOS 8 Stream or Alpine 3.17. We want to download them without
# downloading portable versions from the internet.
customPrepArgs="${customPrepArgs} --no-sdk --no-bootstrap"
prepSdk=false

View file

@ -8,6 +8,9 @@ parameters:
# Branch of the VMR to use (to push to for internal builds)
vmrBranch: $(Build.SourceBranch)
# True when the build is a lite build
isLiteBuild:
# True when build is running from dotnet/dotnet directly
isBuiltFromVmr:
@ -67,8 +70,6 @@ stages:
jobs:
# PR and CI legs ------------------------------------
- template: ../jobs/vmr-build.yml
parameters:
# Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline
@ -89,7 +90,45 @@ stages:
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
# CI - Stage 1 x64 legs ------------------------------------
- template: ../jobs/vmr-build.yml
parameters:
# Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline
buildName: CentOSStream8_Online_CurrentSourceBuiltSdk
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemands }}
container: ${{ parameters.centOSStream8Container }}
buildFromArchive: false # 🚫
enablePoison: false # 🚫
excludeOmniSharpTests: true # ✅
runOnline: true # ✅
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫
reuseBuildArtifactsFrom: CentOSStream8_Online_MsftSdk
- template: ../jobs/vmr-build.yml
parameters:
# Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline
buildName: Alpine317_Offline_PreviousSourceBuiltSdk
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
artifactsRid: alpine.3.17-x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemands }}
container: ${{ parameters.alpine317Container }}
buildFromArchive: false # 🚫
enablePoison: true # ✅
excludeOmniSharpTests: true # ✅
runOnline: false # 🚫
useMonoRuntime: false # 🚫
withPreviousSDK: true # ✅
- ${{ if eq(parameters.isLiteBuild, false) }}:
- template: ../jobs/vmr-build.yml
parameters:
@ -109,24 +148,6 @@ stages:
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫
- template: ../jobs/vmr-build.yml
parameters:
# Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline
buildName: Alpine317_Offline_MsftSdk
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemands }}
container: ${{ parameters.alpine317Container }}
buildFromArchive: false # ✅
enablePoison: false # 🚫
excludeOmniSharpTests: true # ✅
runOnline: false # 🚫
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫
- template: ../jobs/vmr-build.yml
parameters:
# Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline
@ -134,6 +155,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
artifactsRid: centos.8-x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemands }}
@ -152,6 +174,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
artifactsRid: centos.8-x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemands }}
@ -211,7 +234,7 @@ stages:
demands: ${{ variables.defaultPoolDemands }}
container: ${{ parameters.fedora38Container }}
buildFromArchive: true # ✅
enablePoison: true # ✅
enablePoison: false # 🚫
excludeOmniSharpTests: false # 🚫
runOnline: false # 🚫
useMonoRuntime: false # 🚫
@ -235,8 +258,6 @@ stages:
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫
# CI - Stage 1 arm64 Legs ------------------------------------
- template: ../jobs/vmr-build.yml
parameters:
# Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline
@ -253,27 +274,6 @@ stages:
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫
# CI - Stage 2 x64 Legs ------------------------------------
- template: ../jobs/vmr-build.yml
parameters:
# Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline
buildName: CentOSStream8_Online_CurrentSourceBuiltSdk
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemands }}
container: ${{ parameters.centOSStream8Container }}
buildFromArchive: false # 🚫
enablePoison: false # 🚫
excludeOmniSharpTests: true # ✅
runOnline: false # 🚫
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫
reuseBuildArtifactsFrom: CentOSStream8_Online_MsftSdk
- template: ../jobs/vmr-build.yml
parameters:
# Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline