Skip to content

Commit b2cf1ab

Browse files
authored
Merge pull request #838 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2 parents 79ff2b0 + ccdb81f commit b2cf1ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1075
-380
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,6 @@
7272
[submodule "src/toolset"]
7373
path = src/toolset
7474
url = https://github.com/dotnet/toolset
75+
[submodule "src/aspnet-razor"]
76+
path = src/aspnet-razor
77+
url = https://github.com/aspnet/Razor

.vsts.pipelines/builds/ci.yml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
1-
phases:
2-
- template: ../phases/ci-linux.yml
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+
jobs:
9+
- template: ../jobs/ci-linux.yml
310
parameters:
4-
name: ci_Docker
11+
job: centos71
12+
imageName: microsoft/dotnet-buildtools-prereqs:centos-7-b46d863-20180719033416
513
matrix:
6-
centos71-unshared:
7-
artifactName: ci_Docker_centos71-unshared
8-
buildOfflineTarball: true
9-
imageName: microsoft/dotnet-buildtools-prereqs:centos711503_prereqs_2
10-
- template: ../phases/ci-linux.yml
14+
Production: {}
15+
Online: { type: Online }
16+
Online Portable: { type: Online Portable }
17+
Offline: { type: Offline }
18+
Offline Portable: { type: Offline Portable }
19+
20+
- template: ../jobs/ci-linux.yml
1121
parameters:
12-
name: ci_Docker_RHEL_host
13-
dockerRegistryPassword: $(BotAccount-dotnet-docker-acr-bot-password)
14-
dockerRegistryServer: $(acr.server)
15-
dockerRegistryUserName: $(acr.userName)
16-
queueName: DotNetCore-Infra
17-
queueDemands: VSTS_OS -equals Linux_RHEL_7.4
22+
job: debian82
23+
imageName: microsoft/dotnet-buildtools-prereqs:debian-8.2-4e6e894-20181023212416
1824
matrix:
19-
rhel7.5:
20-
artifactName: ci_Docker_RHEL_host_rhel7.5
21-
imageName: dotnetdocker.azurecr.io/dotnet-buildtools-prereqs:rhel-7.5-b4560f6-20180725153037
25+
Production: {}
26+
Online: { type: Online }
27+
Offline: { type: Offline }
28+
29+
- template: ../jobs/ci-linux.yml
30+
parameters:
31+
job: ubuntu1604
32+
imageName: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-c103199-20180628134544
33+
34+
- template: ../jobs/ci-osx.yml
Lines changed: 89 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
parameters:
2-
dockerRegistryPassword: ''
3-
dockerRegistryServer: ''
4-
dockerRegistryUserName: ''
5-
matrix: null
6-
name: ci
7-
queueDemands: Agent.OS -equals Linux
8-
queueName: DotNet-Build
9-
10-
phases:
11-
- phase: ${{ parameters.name }}
2+
job: null
3+
matrix:
4+
Production: {}
5+
pool:
6+
name: Hosted Ubuntu 1604
7+
imageName: null
8+
9+
jobs:
10+
- job: ${{ parameters.job }}
11+
strategy:
12+
matrix: ${{ parameters.matrix }}
13+
pool: ${{ parameters.pool }}
14+
timeoutInMinutes: 270
1215
variables:
13-
# Prefix to distinguish artifacts from different legs. No documented variable for this exists.
14-
artifactName: no_artifact_name
15-
buildLoggingOptions: ''
16-
buildConfiguration: Release
17-
buildOfflineTarball: false
16+
# Prefix to distinguish artifacts from different legs.
17+
artifactName: ${{ format('$(type) {0}', parameters.job) }}
1818
# Use ":z" to set selinux flag for sharing in build-owned root dir. https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label
1919
docker.agentSrc.map: -v $(Build.SourcesDirectory):/agentSrc:z
2020
docker.agentSrc.work: -w /agentSrc
@@ -26,107 +26,67 @@ phases:
2626
docker.src.work: -w /src
2727
docker.tb.map: -v $(rootDirectory)/sb/tarball:/tb:z
2828
docker.tb.work: -w /tb
29-
dockerRegistry.password: ${{ parameters.dockerRegistryPassword }}
30-
dockerRegistry.server: ${{ parameters.dockerRegistryServer }}
31-
dockerRegistry.userName: ${{ parameters.dockerRegistryUserName }}
3229
dropDirectory: $(stagingDirectory)/drop
30+
imageName: ${{ parameters.imageName }}
3331
rootDirectory: $(Build.SourcesDirectory)/..
3432
stagingDirectory: $(rootDirectory)/sb/staging
3533
tarballName: tarball_$(Build.BuildId)
36-
queue:
37-
name: ${{ parameters.queueName }}
38-
demands: ${{ parameters.queueDemands }}
39-
timeoutInMinutes: 240
40-
parallel: 2
41-
matrix: ${{ parameters.matrix }}
34+
# Default type, can be overridden by matrix legs.
35+
type: Production
36+
4237
steps:
4338
- template: ../steps/docker-cleanup-linux.yml
44-
45-
# Docker registry login and pull, if one is defined.
46-
- script: |
47-
docker login -u $(dockerRegistry.userName) -p $(dockerRegistry.password) $(dockerRegistry.server)
48-
docker pull $(imageName)
49-
displayName: Docker login and image pull
50-
condition: and(succeeded(), ne(variables['dockerRegistry.server'], ''))
51-
52-
# Docker registry logout, if one is defined. Do this immediately: avoid unnecessary login time.
53-
- script: docker logout $(dockerRegistry.server)
54-
displayName: Docker logout
55-
condition: ne(variables['dockerRegistry.server'], '')
39+
- template: ../steps/calculate-config-flags-linux.yml
5640

5741
# Create working directory and copy source into it.
5842
- script: |
5943
set -x
44+
df -h
6045
$(docker.run) $(docker.root.map) $(docker.agentSrc.map) $(docker.agentSrc.work) $(imageName) bash -c '
6146
rm -rf /root/sb/
6247
mkdir -p /root/sb/tarball
6348
cp -r . /root/sb/source-build'
6449
displayName: Clean sb directory and copy source from cloned directory
6550
66-
# Fetch vsts commits if building internally.
67-
- script: |
68-
set -x
69-
# Ignore failure for the first command. It will intentionally fail if the commit is only
70-
# available in VSTS. "submodule update --init" is the simplest way to set up the submodule
71-
# directory. ("submodule init" only sets up .git/config, not the e.g. src/coreclr/.git and
72-
# .git/modules/src/coreclr/ directories.)
73-
$(docker.run) $(docker.src.map) $(docker.src.work) $(imageName) git submodule update --init --recursive
74-
$(docker.run) $(docker.src.map) $(docker.src.work) $(imageName) ./fetch-vsts-commits.sh $(user.PAT)
75-
displayName: Fetch internal vsts commits
76-
condition: and(succeeded(), ne(variables['user.PAT'], ''))
77-
78-
# Initialize submodules.
79-
- script: $(docker.run) $(docker.src.map) $(docker.src.work) $(imageName) git submodule update --init --recursive
80-
displayName: Initialize submodules
51+
- template: ../steps/init-submodules-sh.yml
52+
parameters:
53+
commandPrefix: $(docker.run) $(docker.src.map) $(docker.src.work) $(imageName)
8154

8255
# Build source-build.
8356
- script: |
57+
set -x
58+
df -h
59+
if [ "$(sb.tarball)" != "true" ]; then
60+
failOnBaselineError=true
61+
fi
8462
$(docker.run) $(docker.src.map) $(docker.src.work) $(imageName) ./build.sh \
85-
/p:ArchiveDownloadedPackages=true \
86-
/p:Configuration=$(buildConfiguration) \
87-
/p:ContinueOnPrebuiltBaselineError=$(buildOfflineTarball) \
88-
/p:ProdConBlobFeedUrlPrefix=$(prodConBlobFeedUrlPrefix) \
89-
$(buildLoggingOptions)
63+
/p:Configuration=$(sb.configuration) \
64+
/p:PortableBuild=$(sb.portable) \
65+
/p:ArchiveDownloadedPackages=$(sb.tarball) \
66+
/p:FailOnPrebuiltBaselineError=$failOnBaselineError \
67+
/p:ProdConBlobFeedUrlPrefix=$(prodConBlobFeedUrlPrefix)
9068
displayName: Build source-build
91-
timeoutInMinutes: 90
92-
93-
# Copy logs to working directory.
94-
- script: |
95-
set -x
96-
$(docker.run) $(docker.logs.map) $(docker.src.map) $(docker.src.work) $(imageName) /bin/bash -c "
97-
mkdir -p /logs/source-build/logs
98-
find . \( \
99-
-iname '*.binlog' -o \
100-
-iname '*.log' \) \
101-
-exec cp {} --parents /logs/source-build/logs \;"
102-
displayName: Copy source-build logs
103-
condition: always()
104-
continueOnError: true
69+
timeoutInMinutes: 120
10570
10671
# Run smoke tests.
10772
- script: |
73+
set -x
74+
df -h
10875
$(docker.run) $(docker.src.map) $(docker.src.work) $(imageName) ./build.sh \
10976
/t:RunSmokeTest \
110-
/p:Configuration=$(buildConfiguration) \
77+
/p:Configuration=$(sb.configuration) \
11178
/p:ProdConBlobFeedUrlPrefix=$(prodConBlobFeedUrlPrefix)
11279
displayName: Run smoke-test
11380
114-
# Copy smoke test logs to working directory.
115-
- script: |
116-
$(docker.run) $(docker.logs.map) $(docker.src.map) $(docker.src.work) $(imageName) /bin/bash -c "
117-
mkdir -p /logs/source-build/smoke-test
118-
find ./testing-smoke -name '*.log' -exec cp {} /logs/source-build/smoke-test \;"
119-
displayName: Copy smoke-test logs
120-
condition: always()
121-
continueOnError: true
122-
12381
# Create tarball.
12482
- script: |
83+
set -x
84+
df -h
12585
$(docker.run) $(docker.tb.map) $(docker.src.map) $(docker.src.work) $(imageName) ./build-source-tarball.sh \
12686
"/tb/$(tarballName)" \
12787
--skip-build
12888
displayName: Create tarball
129-
condition: and(succeeded(), eq(variables['buildOfflineTarball'], true))
89+
condition: and(succeeded(), eq(variables['sb.tarball'], true))
13090
13191
# tar the tarball directory into the drop directory.
13292
- script: |
@@ -144,46 +104,68 @@ phases:
144104
tar --numeric-owner "--exclude=$smokeTestPackages" -zcf "/drop/tarball/$(tarballName).tar.gz" "$(tarballName)"
145105
tar --numeric-owner -zcf "/drop/tarball/$(tarballName)-smoke-test-prereqs.tar.gz" "$smokeTestPackages"'
146106
displayName: Copy tarball to output
147-
condition: and(succeeded(), eq(variables['buildOfflineTarball'], true))
107+
condition: and(succeeded(), eq(variables['sb.tarball'], true))
148108
149109
# Build tarball.
150110
- script: |
151-
$(docker.run) $(docker.tb.map) $(docker.tb.work) --network='none' $(imageName) "$(tarballName)/build.sh" \
152-
/p:Configuration=$(buildConfiguration) \
153-
$(buildLoggingOptions)
111+
set -x
112+
df -h
113+
networkArg=
114+
if [ "$(sb.tarballOffline)" = "true" ]; then
115+
networkArg="--network=none"
116+
fi
117+
$(docker.run) $(docker.tb.map) $(docker.tb.work) $networkArg $(imageName) "$(tarballName)/build.sh" \
118+
/p:Configuration=$(sb.configuration) \
119+
/p:PortableBuild=$(sb.portable) \
120+
/p:FailOnPrebuiltBaselineError=true
154121
displayName: Build tarball
155-
timeoutInMinutes: 90
156-
condition: and(succeeded(), eq(variables['buildOfflineTarball'], true))
122+
timeoutInMinutes: 120
123+
condition: and(succeeded(), eq(variables['sb.tarball'], true))
157124
158125
# Run smoke tests.
159126
- script: |
127+
set -x
128+
df -h
160129
$(docker.run) $(docker.tb.map) $(docker.tb.work) $(imageName) "$(tarballName)/smoke-test.sh" \
161130
--minimal \
162131
--projectOutput \
163-
--configuration $(buildConfiguration) \
132+
--configuration $(sb.configuration) \
164133
--prodConBlobFeedUrl ''
165134
displayName: Run smoke-test in tarball
166-
condition: and(succeeded(), eq(variables['buildOfflineTarball'], true))
135+
condition: and(succeeded(), eq(variables['sb.tarball'], true))
167136
168-
# Copy all tarball logs to working directory.
137+
- script: df -h
138+
displayName: Check space (df -h)
139+
condition: always()
140+
continueOnError: true
141+
142+
# Copy logs and reports to staging directory.
143+
- script: |
144+
set -x
145+
$(docker.run) $(docker.logs.map) $(docker.src.map) $(docker.src.work) $(imageName) /bin/bash -c "
146+
mkdir -p /logs/source-build/logs
147+
find . \( \
148+
-path './bin/*-report/*' -o \
149+
-path './bin/msbuild-debug/*' -o \
150+
-iname '*.binlog' -o \
151+
-iname '*.log' \) \
152+
-exec cp {} --parents /logs/source-build/logs \;"
153+
displayName: Copy source-build logs
154+
condition: always()
155+
continueOnError: true
169156
- script: |
170157
set -x
171158
$(docker.run) $(docker.logs.map) $(docker.tb.map) $(docker.tb.work) $(imageName) /bin/bash -c "
172159
mkdir -p /logs/tarball/logs
173160
cd \"$(tarballName)\"
174161
find . \( \
162+
-path './bin/*-report/*' -o \
163+
-path './bin/msbuild-debug/*' -o \
175164
-iname '*.binlog' -o \
176165
-iname '*.log' \) \
177-
-exec cp {} --parents /logs/tarball/logs \;
178-
# Copy offline prebuilt report
179-
mkdir -p /logs/prebuilt-report/offline
180-
cp -r ./bin/prebuilt-report/* /logs/prebuilt-report/offline"
181-
$(docker.run) $(docker.logs.map) $(docker.src.map) $(docker.src.work) $(imageName) /bin/bash -c "
182-
# Copy online prebuilt report
183-
mkdir -p /logs/prebuilt-report/online
184-
cp -r ./bin/prebuilt-report/* /logs/prebuilt-report/online"
166+
-exec cp {} --parents /logs/tarball/logs \;"
185167
displayName: Copy tarball logs
186-
condition: eq(variables['buildOfflineTarball'], true)
168+
condition: eq(variables['sb.tarball'], true)
187169
continueOnError: true
188170
189171
# Copy artifacts to staging - Copy to VSTS owned folder is done outside of docker so copied files
@@ -201,15 +183,15 @@ phases:
201183
condition: always()
202184
continueOnError: true
203185
inputs:
204-
PathtoPublish: $(dropDirectory)/logs
186+
PathtoPublish: $(Build.ArtifactStagingDirectory)/drop/logs
205187
ArtifactName: Logs $(artifactName)
206188
ArtifactType: Container
207189
- task: PublishBuildArtifacts@1
208190
displayName: Publish Tarball artifact
209-
condition: eq(variables['buildOfflineTarball'], true)
191+
condition: eq(variables['sb.tarball'], true)
210192
continueOnError: true
211193
inputs:
212-
PathtoPublish: $(dropDirectory)/tarball
194+
PathtoPublish: $(Build.ArtifactStagingDirectory)/drop/tarball
213195
ArtifactName: Tarball $(artifactName)
214196
ArtifactType: Container
215197

@@ -220,3 +202,8 @@ phases:
220202
continueOnError: true
221203

222204
- template: ../steps/docker-cleanup-linux.yml
205+
206+
- script: df -h
207+
displayName: Check space (df -h)
208+
condition: always()
209+
continueOnError: true

0 commit comments

Comments
 (0)