Skip to content

Commit e082d68

Browse files
authored
Generate poison report (prebuilt leaks) on CentOS (#879)
1 parent 3f84e45 commit e082d68

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.vsts.pipelines/builds/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
parameters:
1111
job: centos71
1212
imageName: microsoft/dotnet-buildtools-prereqs:centos-7-b46d863-20180719033416
13+
reportPrebuiltLeaks: true
1314
matrix:
1415
Production: {}
1516
Online: { type: Online }

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

Lines changed: 14 additions & 3 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)
@@ -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 [ "$(sb.tarball)" != "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))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
timeoutInMinutes: 240
1414
variables:
1515
# Prefix to distinguish artifacts from different legs.
16-
artifactName: ${{ format('$(type) {0}', parameters.job) }}
16+
artifactName: ${{ format('{0} $(type)', parameters.job) }}
1717
logsDirectory: $(Build.ArtifactStagingDirectory)/logs
1818
SOURCE_BUILD_SKIP_SUBMODULE_CHECK: true
1919
# Default type, can be overridden by matrix legs.

0 commit comments

Comments
 (0)