Skip to content

Commit d045d52

Browse files
authored
Merge pull request #905 from dotnet-maestro-bot/merge/release/2.1-to-release/2.2
[automated] Merge branch 'release/2.1' => 'release/2.2'
2 parents d1e3ff1 + 2d6013c commit d045d52

31 files changed

+637
-242
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
jobs:
2+
- template: matrix.yml
3+
parameters:
4+
windowsPoolName: dotnet-internal-temp

.vsts.pipelines/builds/ci.yml

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,2 @@
1-
# Matrix build types:
2-
# Production: Only runs the build, not a tarball build. Called "production" because it's the part
3-
# used to produce tarballs. Some platforms might not be capable of producing a tarball yet: we
4-
# still call this type of build "production" for consistency.
5-
# Online: The leg produces a tarball then builds it while connected to the internet.
6-
# Offline: The leg produces a tarball then builds it offline. Network disconnected using Docker.
7-
81
jobs:
9-
- template: ../jobs/ci-linux.yml
10-
parameters:
11-
job: centos71
12-
imageName: microsoft/dotnet-buildtools-prereqs:centos-7-b46d863-20180719033416
13-
reportPrebuiltLeaks: true
14-
matrix:
15-
Production: {}
16-
Online: { type: Online }
17-
Offline: { type: Offline }
18-
Offline Portable: { type: Offline Portable }
19-
20-
- template: ../jobs/ci-linux.yml
21-
parameters:
22-
job: debian82
23-
imageName: microsoft/dotnet-buildtools-prereqs:debian-8.2-4e6e894-20181023212416
24-
matrix:
25-
Production: {}
26-
Online: { type: Online }
27-
28-
- template: ../jobs/ci-linux.yml
29-
parameters:
30-
job: fedora29
31-
imageName: microsoft/dotnet-buildtools-prereqs:fedora-29-2f0798a-20181105183801
32-
matrix:
33-
Production: {}
34-
Online: { type: Online }
35-
Offline: { type: Offline }
36-
Offline Portable: { type: Offline Portable }
37-
38-
- template: ../jobs/ci-linux.yml
39-
parameters:
40-
job: ubuntu1604
41-
imageName: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-c103199-20180628134544
42-
43-
- template: ../jobs/ci-osx.yml
2+
- template: matrix.yml

.vsts.pipelines/builds/matrix.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Matrix build types:
2+
# Production: Only runs the build, not a tarball build. Called "production" because it's the part
3+
# used to produce tarballs. Some platforms might not be capable of producing a tarball yet: we
4+
# still call this type of build "production" for consistency.
5+
# Online: The leg produces a tarball then builds it while connected to the internet.
6+
# Offline: The leg produces a tarball then builds it offline. Network disconnected using Docker.
7+
8+
parameters:
9+
windowsPoolName: dotnet-external-temp
10+
11+
jobs:
12+
- template: ../jobs/ci-linux.yml
13+
parameters:
14+
job: centos71
15+
imageName: microsoft/dotnet-buildtools-prereqs:centos-7-b46d863-20180719033416
16+
reportPrebuiltLeaks: true
17+
matrix:
18+
Production: {}
19+
Online: { type: Online }
20+
Offline: { type: Offline }
21+
Offline Portable: { type: Offline Portable }
22+
23+
- template: ../jobs/ci-linux.yml
24+
parameters:
25+
job: debian82
26+
imageName: microsoft/dotnet-buildtools-prereqs:debian-8.2-4e6e894-20181023212416
27+
matrix:
28+
Production: {}
29+
Online: { type: Online }
30+
31+
- template: ../jobs/ci-linux.yml
32+
parameters:
33+
job: fedora29
34+
imageName: microsoft/dotnet-buildtools-prereqs:fedora-29-2f0798a-20181105183801
35+
matrix:
36+
Production: {}
37+
Online: { type: Online }
38+
Offline: { type: Offline }
39+
Offline Portable: { type: Offline Portable }
40+
41+
- template: ../jobs/ci-linux.yml
42+
parameters:
43+
job: ubuntu1604
44+
imageName: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-c103199-20180628134544
45+
46+
- template: ../jobs/ci-local.yml
47+
parameters:
48+
job: osx
49+
pool:
50+
name: Hosted macOS
51+
scriptPrefix: ./
52+
scriptSuffix: .sh
53+
setupMac: true
54+
55+
- template: ../jobs/ci-local.yml
56+
parameters:
57+
job: windows
58+
pool:
59+
name: ${{ parameters.windowsPoolName }}
60+
scriptPrefix: ''
61+
scriptSuffix: .cmd
62+
setupWindows: true
63+
skipSmokeTest: true
64+
failOnPrebuiltBaselineError: false

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- template: ../steps/docker-cleanup-linux.yml
41-
- template: ../steps/calculate-config-flags-linux.yml
41+
- template: ../steps/calculate-config-flags.yml
4242

4343
# Create working directory and copy source into it.
4444
- script: |
@@ -50,7 +50,7 @@ jobs:
5050
cp -r . /root/sb/source-build'
5151
displayName: Clean sb directory and copy source from cloned directory
5252
53-
- template: ../steps/init-submodules-sh.yml
53+
- template: ../steps/init-submodules.yml
5454
parameters:
5555
commandPrefix: $(docker.run) $(docker.src.map) $(docker.src.work) $(imageName)
5656

@@ -121,7 +121,7 @@ jobs:
121121
networkArg="--network=none"
122122
fi
123123
poisonArg=
124-
if [ "$(sb.tarball)" != "true" ]; then
124+
if [ "$(reportPrebuiltLeaks)" = "true" ]; then
125125
poisonArg="/p:EnablePoison=true"
126126
fi
127127
$(docker.run) $(docker.tb.map) $(docker.tb.work) $networkArg $(imageName) "$(tarballName)/build.sh" \

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

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
parameters:
2+
job: null
3+
matrix:
4+
Production: {}
5+
pool: null
6+
scriptPrefix: null
7+
scriptSuffix: null
8+
setupMac: false
9+
setupWindows: false
10+
skipSmokeTest: false
11+
failOnPrebuiltBaselineError: true
12+
13+
jobs:
14+
- job: ${{ parameters.job }}
15+
strategy:
16+
matrix: ${{ parameters.matrix }}
17+
pool: ${{ parameters.pool }}
18+
timeoutInMinutes: 240
19+
variables:
20+
args.build: >
21+
/p:Configuration=$(sb.configuration)
22+
/p:PortableBuild=$(sb.portable)
23+
/p:FailOnPrebuiltBaselineError=$(failOnPrebuiltBaselineError)
24+
/p:ProdConBlobFeedUrlPrefix=$(prodConBlobFeedUrlPrefix)
25+
args.smokeTest: >
26+
/t:RunSmokeTest
27+
/p:Configuration=$(sb.configuration)
28+
/p:ProdConBlobFeedUrlPrefix=$(prodConBlobFeedUrlPrefix)
29+
# Prefix to distinguish artifacts from different legs.
30+
artifactName: ${{ format('{0} $(type)', parameters.job) }}
31+
failOnPrebuiltBaselineError: ${{ parameters.failOnPrebuiltBaselineError }}
32+
logsDirectory: $(Build.ArtifactStagingDirectory)/logs
33+
SOURCE_BUILD_SKIP_SUBMODULE_CHECK: true
34+
# Default type, can be overridden by matrix legs.
35+
type: Production
36+
37+
steps:
38+
- checkout: self
39+
clean: true
40+
41+
# Make sure submodules from other branches are removed: pass extra f.
42+
- script: git clean -xdff
43+
displayName: Clean leftover submodules
44+
45+
# Run 'clean -a' script to recursively clean submodules: AzDO doesn't do this, and otherwise we
46+
# fail to apply patches on persistent machines like dotnet-external-temp.
47+
- script: ${{ format('{0}clean{1} -a', parameters.scriptPrefix, parameters.scriptSuffix) }}
48+
displayName: Run source-build 'clean all' script
49+
50+
- template: ../steps/check-space-powershell.yml
51+
52+
- ${{ if eq(parameters.setupMac, true) }}:
53+
- template: ../steps/setup-macos-native.yml
54+
- ${{ if eq(parameters.setupWindows, true) }}:
55+
- template: ../steps/setup-windows-bash.yml
56+
- template: ../steps/setup-windows-python.yml
57+
58+
- template: ../steps/calculate-config-flags.yml
59+
60+
- template: ../steps/init-submodules.yml
61+
62+
- template: ../steps/check-space-powershell.yml
63+
64+
# Build source-build.
65+
- script: ${{ format('{0}build{1} $(args.build)', parameters.scriptPrefix, parameters.scriptSuffix) }}
66+
displayName: Build source-build
67+
timeoutInMinutes: 150
68+
69+
- template: ../steps/check-space-powershell.yml
70+
71+
# Run smoke tests.
72+
- ${{ if ne(parameters.skipSmokeTest, true) }}:
73+
- bash: ${{ format('{0}build{1} $(args.smokeTest)', parameters.scriptPrefix, parameters.scriptSuffix) }}
74+
displayName: Run smoke-test
75+
76+
# Gather artifacts. Uses git bash on Windows.
77+
- bash: |
78+
set -x
79+
copyWithParents="cp {} --parents"
80+
if command -v rsync; then
81+
# On Mac, "--parents" isn't supported, but we can use rsync.
82+
copyWithParents="rsync -R {}"
83+
fi
84+
# Clean up previous build's staging dir, in case VSTS didn't do it.
85+
rm -rf "$(logsDirectory)"
86+
# Copy all these files to the logs dir, preserving relative path.
87+
mkdir -p "$(logsDirectory)"
88+
find . \( \
89+
-path './bin/*-report/*' -o \
90+
-path './bin/msbuild-debug/*' -o \
91+
-iname '*.binlog' -o \
92+
-iname '*.log' \) \
93+
-exec $copyWithParents "$(logsDirectory)" \;
94+
displayName: Copy logs to staging directory
95+
condition: always()
96+
continueOnError: true
97+
98+
# Publish artifacts.
99+
- task: PublishBuildArtifacts@1
100+
displayName: Publish Logs artifact
101+
condition: always()
102+
continueOnError: true
103+
inputs:
104+
PathtoPublish: $(logsDirectory)
105+
ArtifactName: Logs $(artifactName)
106+
ArtifactType: Container

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

Lines changed: 0 additions & 105 deletions
This file was deleted.

.vsts.pipelines/steps/calculate-config-flags-linux.yml renamed to .vsts.pipelines/steps/calculate-config-flags.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
steps:
2-
- script: |
2+
- bash: |
33
setvariable() {
44
echo "Setting '$1' to '$2'"
55
echo "##vso[task.setvariable variable=$1;]$2"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
steps:
2+
- powershell: |
3+
$g = 1024 * 1024 * 1024;
4+
echo "Name`tAvailable (GiB)`tTotal (GiB)"
5+
[System.IO.DriveInfo]::GetDrives() |
6+
%{ echo "$($_.Name)`t$($_.AvailableFreeSpace / $g)`t$($_.TotalSize / $g)" }
7+
displayName: (Diag) Check drive fullness
8+
condition: always()
9+
continueOnError: true

.vsts.pipelines/steps/init-submodules-sh.yml renamed to .vsts.pipelines/steps/init-submodules.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ parameters:
33

44
steps:
55
# Fetch vsts commits if building internally.
6-
- script: |
6+
- bash: |
77
set -x
88
# Ignore failure for the first command. It will intentionally fail if the commit is only
99
# available in VSTS. "submodule update --init" is the simplest way to set up the submodule
@@ -17,7 +17,7 @@ steps:
1717
condition: and(succeeded(), ne(variables['user.PAT'], ''))
1818
1919
# Initialize submodules.
20-
- script: |
20+
- bash: |
2121
set -x
2222
$commandPrefix git submodule update --init --recursive
2323
displayName: Initialize submodules

0 commit comments

Comments
 (0)