Skip to content

Commit c652b64

Browse files
committed
Merge branch 'release/2.2' into master
# Conflicts: # build.proj # dependencies.props # dir.props # patches/cli/0001-Persist-ASP.NET-runtime-patch-targeting-default.patch # repos/core-setup.proj # repos/corefx.proj # repos/dir.targets # repos/known-good.proj # repos/nuget-client.proj # repos/roslyn-tools.proj # src/cli # src/core-setup # src/coreclr # src/corefx # src/nuget-client # src/sdk # src/websdk # tools-local/init-build.proj # tools-local/prebuilt-baseline-offline.xml # tools-local/prebuilt-baseline-online.xml
2 parents b90765c + d045d52 commit c652b64

40 files changed

+745
-229
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 & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +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-
matrix:
14-
Production: {}
15-
Online: { type: Online }
16-
Offline: { type: Offline }
17-
Offline Portable: { type: Offline Portable }
18-
19-
- template: ../jobs/ci-linux.yml
20-
parameters:
21-
job: debian82
22-
imageName: microsoft/dotnet-buildtools-prereqs:debian-8.2-4e6e894-20181023212416
23-
matrix:
24-
Production: {}
25-
Online: { type: Online }
26-
27-
- template: ../jobs/ci-linux.yml
28-
parameters:
29-
job: fedora29
30-
imageName: microsoft/dotnet-buildtools-prereqs:fedora-29-2f0798a-20181105183801
31-
matrix:
32-
Production: {}
33-
Online: { type: Online }
34-
Offline: { type: Offline }
35-
Offline Portable: { type: Offline Portable }
36-
37-
- template: ../jobs/ci-linux.yml
38-
parameters:
39-
job: ubuntu1604
40-
imageName: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-c103199-20180628134544
41-
42-
- 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: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ parameters:
55
pool:
66
name: Hosted Ubuntu 1604
77
imageName: null
8+
reportPrebuiltLeaks: false
89

910
jobs:
1011
- job: ${{ parameters.job }}
@@ -28,6 +29,7 @@ jobs:
2829
docker.tb.work: -w /tb
2930
dropDirectory: $(stagingDirectory)/drop
3031
imageName: ${{ parameters.imageName }}
32+
reportPrebuiltLeaks: ${{ parameters.reportPrebuiltLeaks }}
3133
rootDirectory: $(Build.SourcesDirectory)/..
3234
stagingDirectory: $(rootDirectory)/sb/staging
3335
tarballName: tarball_$(Build.BuildId)
@@ -36,7 +38,7 @@ jobs:
3638

3739
steps:
3840
- template: ../steps/docker-cleanup-linux.yml
39-
- template: ../steps/calculate-config-flags-linux.yml
41+
- template: ../steps/calculate-config-flags.yml
4042

4143
# Create working directory and copy source into it.
4244
- script: |
@@ -48,7 +50,7 @@ jobs:
4850
cp -r . /root/sb/source-build'
4951
displayName: Clean sb directory and copy source from cloned directory
5052
51-
- template: ../steps/init-submodules-sh.yml
53+
- template: ../steps/init-submodules.yml
5254
parameters:
5355
commandPrefix: $(docker.run) $(docker.src.map) $(docker.src.work) $(imageName)
5456

@@ -68,7 +70,7 @@ jobs:
6870
displayName: Build source-build
6971
timeoutInMinutes: 120
7072
71-
# Run smoke tests.
73+
# Run smoke tests. This is needed even in tarball legs to create the smoke-test-prereqs archive.
7274
- script: |
7375
set -x
7476
df -h
@@ -82,9 +84,13 @@ jobs:
8284
- script: |
8385
set -x
8486
df -h
87+
args="--skip-build"
88+
if [ "$(reportPrebuiltLeaks)" = "true" ]; then
89+
args="$args --enable-leak-detection"
90+
fi
8591
$(docker.run) $(docker.tb.map) $(docker.src.map) $(docker.src.work) $(imageName) ./build-source-tarball.sh \
8692
"/tb/$(tarballName)" \
87-
--skip-build
93+
$args
8894
displayName: Create tarball
8995
condition: and(succeeded(), eq(variables['sb.tarball'], true))
9096
@@ -114,10 +120,15 @@ jobs:
114120
if [ "$(sb.tarballOffline)" = "true" ]; then
115121
networkArg="--network=none"
116122
fi
123+
poisonArg=
124+
if [ "$(reportPrebuiltLeaks)" = "true" ]; then
125+
poisonArg="/p:EnablePoison=true"
126+
fi
117127
$(docker.run) $(docker.tb.map) $(docker.tb.work) $networkArg $(imageName) "$(tarballName)/build.sh" \
118128
/p:Configuration=$(sb.configuration) \
119129
/p:PortableBuild=$(sb.portable) \
120-
/p:FailOnPrebuiltBaselineError=true
130+
/p:FailOnPrebuiltBaselineError=true \
131+
$poisonArg
121132
displayName: Build tarball
122133
timeoutInMinutes: 120
123134
condition: and(succeeded(), eq(variables['sb.tarball'], true))
@@ -195,6 +206,15 @@ jobs:
195206
ArtifactName: Tarball $(artifactName)
196207
ArtifactType: Container
197208

209+
# Publish prebuilt report data to blob storage.
210+
- template: ../steps/publish-prebuilt-data-sh.yml
211+
parameters:
212+
relativeBlobPath: prebuilt-data/$(Build.SourceBranchName)/latest/$(artifactName)
213+
# Also publish per-build data to a unique location for future use.
214+
- template: ../steps/publish-prebuilt-data-sh.yml
215+
parameters:
216+
relativeBlobPath: prebuilt-data/$(Build.SourceBranchName)/rolling/$(Build.SourceVersion)/$(Build.BuildNumber)/$(Build.DefinitionName)/$(artifactName)
217+
198218
# Clean up (very large) working directory. root owner makes it difficult for others to remove.
199219
- script: $(docker.run) $(docker.root.map) $(imageName) bash -c 'rm -rf /root/sb'
200220
displayName: Clean sb directory

.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

0 commit comments

Comments
 (0)