Skip to content

Commit 2ff5851

Browse files
committed
Merge 'release/2.1' into 2.1.519
2 parents 61894e8 + 6c4b255 commit 2ff5851

File tree

6 files changed

+151
-40
lines changed

6 files changed

+151
-40
lines changed

.vsts.pipelines/builds/ci-internal.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
jobs:
1+
stages:
22
- template: matrix.yml
33
parameters:
44
windowsPoolName: NetCoreInternal-Int-Pool

.vsts.pipelines/builds/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
jobs:
1+
stages:
22
- template: matrix.yml

.vsts.pipelines/builds/matrix.yml

Lines changed: 43 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,58 +9,70 @@ parameters:
99
windowsPoolName: NetCorePublic-Int-Pool
1010
windowsQueueName: buildpool.windows.10.amd64.vs2017.open
1111

12-
jobs:
13-
- template: ../jobs/ci-linux.yml
12+
stages:
13+
- template: ../stages/stage-jobs-matrix.yml
1414
parameters:
15-
job: centos71
16-
imageName: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-359e48e-20200313130914
17-
reportPrebuiltLeaks: true
15+
jobTemplateName: ../jobs/ci-linux.yml
16+
name: centos71
17+
jobParameters:
18+
imageName: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-359e48e-20200313130914
19+
reportPrebuiltLeaks: true
1820
matrix:
1921
Production: {}
2022
Online: { type: Online }
2123
Offline: { type: Offline }
2224
Offline Portable: { type: Offline Portable }
2325

24-
- template: ../jobs/ci-linux.yml
26+
- template: ../stages/stage-jobs-matrix.yml
2527
parameters:
26-
job: debian9
27-
imageName: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-stretch-bfcd90a-20200121150012
28+
jobTemplateName: ../jobs/ci-linux.yml
29+
name: debian9
30+
jobParameters:
31+
imageName: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-stretch-bfcd90a-20200121150012
2832
matrix:
2933
Production: {}
3034
Online: { type: Online }
3135

32-
- template: ../jobs/ci-linux.yml
36+
- template: ../stages/stage-jobs-matrix.yml
3337
parameters:
34-
job: fedora30
35-
imageName: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-30-bfcd90a-20200324132732
38+
jobTemplateName: ../jobs/ci-linux.yml
39+
name: fedora30
40+
jobParameters:
41+
imageName: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-30-bfcd90a-20200324132732
3642
matrix:
3743
Production: {}
3844
Online: { type: Online }
3945
Offline: { type: Offline }
4046
Offline Portable: { type: Offline Portable }
4147

42-
- template: ../jobs/ci-linux.yml
48+
- template: ../stages/stage-jobs-matrix.yml
4349
parameters:
44-
job: ubuntu1804
45-
imageName: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-85814b7-20200324125103
50+
jobTemplateName: ../jobs/ci-linux.yml
51+
name: ubuntu1804
52+
jobParameters:
53+
imageName: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-85814b7-20200324125103
4654

47-
- template: ../jobs/ci-local.yml
55+
- template: ../stages/stage-jobs-matrix.yml
4856
parameters:
49-
job: osx
50-
pool:
51-
name: Hosted macOS
52-
scriptPrefix: ./
53-
scriptSuffix: .sh
54-
setupMac: true
57+
jobTemplateName: ../jobs/ci-local.yml
58+
name: osx
59+
jobParameters:
60+
pool:
61+
name: Hosted macOS
62+
scriptPrefix: ./
63+
scriptSuffix: .sh
64+
setupMac: true
5565

56-
- template: ../jobs/ci-local.yml
66+
- template: ../stages/stage-jobs-matrix.yml
5767
parameters:
58-
job: windows
59-
pool:
60-
name: ${{ parameters.windowsPoolName }}
61-
queue: ${{ parameters.windowsQueueName }}
62-
scriptPrefix: ''
63-
scriptSuffix: .cmd
64-
setupWindows: true
65-
skipSmokeTest: true
66-
failOnPrebuiltBaselineError: false
68+
jobTemplateName: ../jobs/ci-local.yml
69+
name: windows
70+
jobParameters:
71+
pool:
72+
name: ${{ parameters.windowsPoolName }}
73+
queue: ${{ parameters.windowsQueueName }}
74+
scriptPrefix: ''
75+
scriptSuffix: .cmd
76+
setupWindows: true
77+
skipSmokeTest: true
78+
failOnPrebuiltBaselineError: false

.vsts.pipelines/jobs/ci-linux.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
parameters:
22
job: null
3-
matrix:
4-
Production: {}
53
pool:
64
name: Hosted Ubuntu 1604
75
imageName: null
86
reportPrebuiltLeaks: false
97

108
jobs:
119
- job: ${{ parameters.job }}
12-
strategy:
13-
matrix: ${{ parameters.matrix }}
1410
pool: ${{ parameters.pool }}
1511
timeoutInMinutes: 270
1612
variables:
17-
# Prefix to distinguish artifacts from different legs.
18-
artifactName: ${{ format('{0} $(type)', parameters.job) }}
13+
artifactName: ${{ parameters.job }}
1914
# Use ":z" to set selinux flag for sharing in build-owned root dir. https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label
2015
docker.agentSrc.map: -v $(Build.SourcesDirectory):/agentSrc:z
2116
docker.agentSrc.work: -w /agentSrc
@@ -34,7 +29,7 @@ jobs:
3429
stagingDirectory: $(rootDirectory)/sb/staging
3530
tarballName: tarball_$(Build.BuildId)
3631
# Default type, can be overridden by matrix legs.
37-
type: Production
32+
type: ${{ coalesce(parameters.type, 'Production') }}
3833

3934
steps:
4035
- template: ../steps/cleanup-unneeded-files.yml
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
parameters:
2+
gatherJobs: []
3+
gatherPortableJob: ''
4+
5+
# downloadBuildConfig by default uses the current build, but can be changed to point at an
6+
# existing/previous build by passing properties like these, instead:
7+
#
8+
# buildType: specific
9+
# buildVersionToDownload: specific
10+
# project: 'public'
11+
# definition: 'source-build-CI'
12+
# buildId: 741400
13+
#
14+
# By defining this in one place, it's easier to set this up if necessary. This may be useful
15+
# because the build takes a long time relative to prepare-artifacts, and we may want to tweak
16+
# prepare-artifacts in case it fails due to a bug in the future. ...It's also nice to have the
17+
# properties listed in this comment even if we don't use them here, because it's hard to figure
18+
# them out from the docs alone--it'll be a nice reference.
19+
downloadBuildConfig:
20+
buildType: current
21+
22+
stages:
23+
- stage: PrepareArtifacts
24+
dependsOn:
25+
- ${{ each gather in parameters.gatherJobs }}:
26+
- ${{ gather.job }}
27+
jobs:
28+
- job: PrepareArtifacts
29+
pool:
30+
vmImage: 'ubuntu-18.04'
31+
timeoutInMinutes: 300
32+
workspace:
33+
clean: all
34+
variables:
35+
artifactStageDir: '$(Build.SourcesDirectory)/artifacts/stage'
36+
nonportableSourceBuiltStageDir: '$(artifactStageDir)/nonportableSourceBuilt'
37+
portableSourceBuiltStageDir: '$(artifactStageDir)/portableSourceBuilt'
38+
allSourceBuiltStageDir: '$(artifactStageDir)/allSourceBuilt'
39+
outputTarballFile: '$(artifactStageDir)/Private.SourceBuilt.Artifacts.$(Build.BuildId).tar.gz'
40+
steps:
41+
- ${{ each gather in parameters.gatherJobs }}:
42+
- task: DownloadBuildArtifacts@0
43+
displayName: 'Download ${{ gather.job }} nonportable'
44+
inputs:
45+
${{ insert }}: ${{ parameters.downloadBuildConfig }}
46+
downloadType: single
47+
artifactName: ${{ coalesce(gather.artifactName, format('Tarball {0}', gather.job)) }}
48+
downloadPath: $(nonportableSourceBuiltStageDir)
49+
allowPartiallySucceededBuilds: true
50+
51+
- task: DownloadBuildArtifacts@0
52+
displayName: 'Download ${{ parameters.gatherPortableJob }} portable'
53+
inputs:
54+
${{ insert }}: ${{ parameters.downloadBuildConfig }}
55+
downloadType: single
56+
artifactName: 'Tarball ${{ parameters.gatherPortableJob }}'
57+
downloadPath: $(portableSourceBuiltStageDir)
58+
allowPartiallySucceededBuilds: true
59+
60+
- script: |
61+
find "$(artifactStageDir)" -type f -exec du -h {} \;
62+
displayName: Show downloaded artifacts
63+
64+
- script: |
65+
set -xeuo pipefail
66+
mkdir -p "$(allSourceBuiltStageDir)"
67+
68+
# Extract all source-built assets into a single place. Overlap and overwrites are expected.
69+
# What matters is the portable ones are copied last and ultimately win.
70+
find \
71+
"$(nonportableSourceBuiltStageDir)" \
72+
"$(portableSourceBuiltStageDir)" \
73+
-iname 'Private.SourceBuilt.Artifacts.*.tar.gz' \
74+
-exec tar -xf {} -C "$(allSourceBuiltStageDir)" \;
75+
76+
# Intentionally don't create a top-level directory. Matches earlier versions of this artifact.
77+
cd "$(allSourceBuiltStageDir)"
78+
tar --numeric-owner -czf "$(outputTarballFile)" *
79+
displayName: Create source-built artifacts tar.gz
80+
81+
- publish: '$(outputTarballFile)'
82+
artifact: Private.SourceBuilt.Artifacts
83+
84+
- script: |
85+
tar -tf "$(outputTarballFile)" | sort
86+
displayName: Show tarball contents
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
parameters:
2+
name: ''
3+
dependsOn: []
4+
matrix:
5+
Production: {}
6+
jobParameters: {}
7+
8+
stages:
9+
- ${{ each matrixPair in parameters.matrix }}:
10+
- stage: ${{ parameters.name }}_${{ replace(coalesce(matrixPair.value.type, 'Production'), ' ', '_') }}
11+
dependsOn: ${{ parameters.dependsOn }}
12+
jobs:
13+
- template: ${{ parameters.jobTemplateName }}
14+
parameters:
15+
${{ insert }}: ${{ parameters.jobParameters }}
16+
job: ${{ parameters.name }}_${{ replace(coalesce(matrixPair.value.type, 'Production'), ' ', '_') }}
17+
buildTypeName: ${{ matrixPair.key }}
18+
type: ${{ matrixPair.value.type }}

0 commit comments

Comments
 (0)