2021-08-06 17:50:48 +00:00
|
|
|
# Builds a source-build tarball
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
# Custom condition to apply to the job
|
|
|
|
condition: true
|
|
|
|
|
|
|
|
# Dependent jobs that must be completed before this job will run
|
|
|
|
dependsOn:
|
|
|
|
|
2022-02-10 21:58:01 +00:00
|
|
|
# Resource id of the installer build to retrieve source/product tarball's from
|
|
|
|
installerBuildResourceId: current
|
2021-08-06 17:50:48 +00:00
|
|
|
|
2021-11-17 22:07:20 +00:00
|
|
|
# The following parameters aren't expected to be passed in rather they are used for encapsulation
|
|
|
|
# -----------------------------------------------------------------------------------------------
|
2022-02-10 21:58:01 +00:00
|
|
|
buildJobTimeout: 300
|
2021-12-14 22:29:29 +00:00
|
|
|
centOS7Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-source-build-20210714125450-5d87b80
|
|
|
|
centOS8Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-source-build-20211118190102-9355e7b
|
2022-02-15 23:35:05 +00:00
|
|
|
centOSStream9Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9-20220107135047-4cd394c
|
2021-12-14 22:29:29 +00:00
|
|
|
debian9Container: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-stretch-20211001171226-047508b
|
2021-11-17 22:07:20 +00:00
|
|
|
fedora33Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2
|
2021-12-14 22:29:29 +00:00
|
|
|
ubuntu1804Container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-20210924170306-047508b
|
2021-11-17 22:07:20 +00:00
|
|
|
poolInternal:
|
|
|
|
name: NetCore1ESPool-Svc-Internal
|
2021-12-06 22:37:28 +00:00
|
|
|
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
|
2021-11-17 22:07:20 +00:00
|
|
|
poolPublic:
|
|
|
|
name: NetCore1ESPool-Svc-Public
|
2021-12-06 22:37:28 +00:00
|
|
|
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
|
2021-11-17 22:07:20 +00:00
|
|
|
tarballDir: $(Build.StagingDirectory)/tarball
|
|
|
|
|
2021-08-06 17:50:48 +00:00
|
|
|
jobs:
|
2021-11-17 22:07:20 +00:00
|
|
|
- job: Build_Tarball
|
2021-08-06 17:50:48 +00:00
|
|
|
condition: ${{ parameters.condition }}
|
2021-11-17 22:07:20 +00:00
|
|
|
displayName: Build Tarball
|
2021-08-06 17:50:48 +00:00
|
|
|
dependsOn: ${{ parameters.dependsOn }}
|
|
|
|
pool:
|
2021-09-01 04:20:55 +00:00
|
|
|
${{ if eq(variables['System.TeamProject'], 'public') }}:
|
2021-11-17 22:07:20 +00:00
|
|
|
${{ parameters.poolPublic }}
|
2021-09-01 04:20:55 +00:00
|
|
|
${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
2021-11-17 22:07:20 +00:00
|
|
|
${{ parameters.poolInternal }}
|
2021-08-06 17:50:48 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-12-14 22:29:29 +00:00
|
|
|
CentOS7-Online:
|
2022-02-17 01:05:17 +00:00
|
|
|
_BootstrapPrep: false
|
2021-11-17 22:07:20 +00:00
|
|
|
_BuildArch: x64
|
2021-12-14 22:29:29 +00:00
|
|
|
_Container: ${{ parameters.centOS7Container }}
|
2021-12-17 20:30:05 +00:00
|
|
|
_ExcludeOmniSharpTests: true
|
2022-02-10 21:58:01 +00:00
|
|
|
_Platform: linux
|
2021-11-17 22:07:20 +00:00
|
|
|
_RunOnline: true
|
2021-12-14 22:29:29 +00:00
|
|
|
CentOS7-Offline:
|
2022-02-17 01:05:17 +00:00
|
|
|
_BootstrapPrep: false
|
2021-11-17 22:07:20 +00:00
|
|
|
_BuildArch: x64
|
2021-12-14 22:29:29 +00:00
|
|
|
_Container: ${{ parameters.centOS7Container }}
|
2021-12-17 20:30:05 +00:00
|
|
|
_ExcludeOmniSharpTests: true
|
2022-02-10 21:58:01 +00:00
|
|
|
_Platform: linux
|
2021-11-17 22:07:20 +00:00
|
|
|
_RunOnline: false
|
2021-12-14 22:29:29 +00:00
|
|
|
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
|
|
|
|
CentOS8-Offline:
|
2022-02-17 01:05:17 +00:00
|
|
|
_BootstrapPrep: false
|
2021-12-14 22:29:29 +00:00
|
|
|
_BuildArch: x64
|
|
|
|
_Container: ${{ parameters.centOS8Container }}
|
2021-12-17 20:30:05 +00:00
|
|
|
_ExcludeOmniSharpTests: false
|
2022-02-10 21:58:01 +00:00
|
|
|
_Platform: linux
|
2021-12-14 22:29:29 +00:00
|
|
|
_RunOnline: false
|
2022-02-15 23:35:05 +00:00
|
|
|
CentOSStream9-Offline:
|
2022-02-17 01:05:17 +00:00
|
|
|
_BootstrapPrep: false
|
2022-02-15 23:35:05 +00:00
|
|
|
_BuildArch: x64
|
|
|
|
_Container: ${{ parameters.centOSStream9Container }}
|
|
|
|
_ExcludeOmniSharpTests: false
|
|
|
|
_Platform: linux
|
|
|
|
_RunOnline: false
|
2021-12-14 22:29:29 +00:00
|
|
|
Fedora33-Offline:
|
|
|
|
_BootstrapPrep: false
|
|
|
|
_BuildArch: x64
|
|
|
|
_Container: ${{ parameters.fedora33Container }}
|
2021-12-17 20:30:05 +00:00
|
|
|
_ExcludeOmniSharpTests: false
|
2022-02-10 21:58:01 +00:00
|
|
|
_Platform: linux
|
2021-12-14 22:29:29 +00:00
|
|
|
_RunOnline: false
|
|
|
|
Ubuntu1804-Offline:
|
2022-02-17 01:05:17 +00:00
|
|
|
_BootstrapPrep: false
|
2021-12-14 22:29:29 +00:00
|
|
|
_BuildArch: x64
|
|
|
|
_Container: ${{ parameters.ubuntu1804Container }}
|
2021-12-17 20:30:05 +00:00
|
|
|
_ExcludeOmniSharpTests: false
|
2022-02-10 21:58:01 +00:00
|
|
|
_Platform: linux
|
2021-12-14 22:29:29 +00:00
|
|
|
_RunOnline: false
|
2022-02-10 21:58:01 +00:00
|
|
|
timeoutInMinutes: ${{ parameters.buildJobTimeout }}
|
2022-02-04 18:52:30 +00:00
|
|
|
variables:
|
|
|
|
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
|
|
|
|
- group: AzureDevOps-Artifact-Feeds-Pats
|
2021-08-06 17:50:48 +00:00
|
|
|
workspace:
|
|
|
|
clean: all
|
|
|
|
|
|
|
|
steps:
|
2022-02-04 18:52:30 +00:00
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
|
2021-11-17 22:07:20 +00:00
|
|
|
- template: /src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml
|
2021-08-06 17:50:48 +00:00
|
|
|
parameters:
|
2021-11-17 22:07:20 +00:00
|
|
|
buildArch: $(_BuildArch)
|
|
|
|
container: $(_Container)
|
2021-12-17 20:30:05 +00:00
|
|
|
excludeOmniSharpTests: $(_ExcludeOmniSharpTests)
|
2022-02-10 21:58:01 +00:00
|
|
|
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
|
|
|
|
platform: $(_Platform)
|
2021-11-17 22:07:20 +00:00
|
|
|
prepScript: |
|
|
|
|
set -x
|
|
|
|
|
2021-12-14 22:29:29 +00:00
|
|
|
customPrepArgs=
|
|
|
|
if [ '$(_BootstrapPrep)' = 'true' ]; then
|
|
|
|
customPrepArgs='--bootstrap'
|
|
|
|
fi
|
|
|
|
|
|
|
|
docker run --rm -v ${{ parameters.tarballDir }}:/tarball -w /tarball $(_Container) ./prep.sh ${customPrepArgs}
|
2021-11-17 22:07:20 +00:00
|
|
|
runOnline: $(_RunOnline)
|
|
|
|
tarballDir: ${{ parameters.tarballDir }}
|
|
|
|
|
|
|
|
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
|
|
|
|
- job: Rebuild_Tarball
|
|
|
|
displayName: Rebuild Tarball With Previous
|
|
|
|
dependsOn: Build_Tarball
|
2022-03-02 21:58:55 +00:00
|
|
|
# Always attempt to run the bootstrap leg (e.g. even when stage 1 tests fail) in order to get a complete accessment of the build status.
|
|
|
|
# The bootstrap build will shortcut if the stage 1 build failed.
|
|
|
|
condition: succeededOrFailed()
|
2021-11-17 22:07:20 +00:00
|
|
|
pool:
|
|
|
|
${{ if eq(variables['System.TeamProject'], 'public') }}:
|
|
|
|
${{ parameters.poolPublic }}
|
|
|
|
${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
|
|
|
${{ parameters.poolInternal }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Fedora33-Offline:
|
|
|
|
_PreviousSourceBuildArtifact: Build Tarball Fedora33-Offline_Artifacts
|
|
|
|
_BuildArch: x64
|
|
|
|
_Container: ${{ parameters.fedora33Container }}
|
2022-02-10 21:58:01 +00:00
|
|
|
_Platform: linux
|
2021-11-17 22:07:20 +00:00
|
|
|
_RunOnline: false
|
2022-02-10 21:58:01 +00:00
|
|
|
timeoutInMinutes: ${{ parameters.buildJobTimeout }}
|
2022-02-04 18:52:30 +00:00
|
|
|
variables:
|
|
|
|
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
|
|
|
|
- group: AzureDevOps-Artifact-Feeds-Pats
|
2021-11-17 22:07:20 +00:00
|
|
|
workspace:
|
|
|
|
clean: all
|
|
|
|
|
|
|
|
steps:
|
2022-02-04 18:52:30 +00:00
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
|
2021-11-17 22:07:20 +00:00
|
|
|
- download: current
|
|
|
|
artifact: $(_PreviousSourceBuildArtifact)
|
|
|
|
patterns: '*.tar.gz'
|
|
|
|
displayName: Download Previous Source Build Artifacts
|
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: Copy Previous Source Build Artifacts
|
|
|
|
inputs:
|
|
|
|
SourceFolder: $(PIPELINE.WORKSPACE)/$(_PreviousSourceBuildArtifact)
|
|
|
|
Contents: '*.tar.gz'
|
|
|
|
TargetFolder: ${{ parameters.tarballDir }}/packages/archive/
|
|
|
|
|
|
|
|
- template: /src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml
|
|
|
|
parameters:
|
|
|
|
additionalBuildArgs: --with-sdk /tarball/.dotnet
|
|
|
|
buildArch: $(_BuildArch)
|
|
|
|
container: $(_Container)
|
2022-02-10 21:58:01 +00:00
|
|
|
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
|
|
|
|
isBootstrapped: true
|
|
|
|
platform: $(_Platform)
|
2021-11-17 22:07:20 +00:00
|
|
|
prepScript: |
|
|
|
|
set -x
|
|
|
|
|
|
|
|
mkdir ${{ parameters.tarballDir }}/.dotnet
|
|
|
|
tarballFilePath="${{ parameters.tarballDir }}/packages/archive/dotnet-sdk-*.tar.gz"
|
|
|
|
eval tar -ozxf "$tarballFilePath" -C "${{ parameters.tarballDir }}/.dotnet"
|
|
|
|
eval rm -f "$tarballFilePath"
|
|
|
|
runOnline: $(_RunOnline)
|
|
|
|
tarballDir: ${{ parameters.tarballDir }}
|