@@ -5,6 +5,7 @@ parameters:
5
5
pool :
6
6
name : Hosted Ubuntu 1604
7
7
imageName : null
8
+ reportPrebuiltLeaks : false
8
9
9
10
jobs :
10
11
- job : ${{ parameters.job }}
28
29
docker.tb.work : -w /tb
29
30
dropDirectory : $(stagingDirectory)/drop
30
31
imageName : ${{ parameters.imageName }}
32
+ reportPrebuiltLeaks : ${{ parameters.reportPrebuiltLeaks }}
31
33
rootDirectory : $(Build.SourcesDirectory)/..
32
34
stagingDirectory : $(rootDirectory)/sb/staging
33
35
tarballName : tarball_$(Build.BuildId)
68
70
displayName: Build source-build
69
71
timeoutInMinutes: 120
70
72
71
- # Run smoke tests.
73
+ # Run smoke tests. This is needed even in tarball legs to create the smoke-test-prereqs archive.
72
74
- script : |
73
75
set -x
74
76
df -h
82
84
- script : |
83
85
set -x
84
86
df -h
87
+ args="--skip-build"
88
+ if [ "$(reportPrebuiltLeaks)" = "true" ]; then
89
+ args="$args --enable-leak-detection"
90
+ fi
85
91
$(docker.run) $(docker.tb.map) $(docker.src.map) $(docker.src.work) $(imageName) ./build-source-tarball.sh \
86
92
"/tb/$(tarballName)" \
87
- --skip-build
93
+ $args
88
94
displayName: Create tarball
89
95
condition: and(succeeded(), eq(variables['sb.tarball'], true))
90
96
@@ -114,10 +120,15 @@ jobs:
114
120
if [ "$(sb.tarballOffline)" = "true" ]; then
115
121
networkArg="--network=none"
116
122
fi
123
+ poisonArg=
124
+ if [ "$(sb.tarball)" != "true" ]; then
125
+ poisonArg="/p:EnablePoison=true"
126
+ fi
117
127
$(docker.run) $(docker.tb.map) $(docker.tb.work) $networkArg $(imageName) "$(tarballName)/build.sh" \
118
128
/p:Configuration=$(sb.configuration) \
119
129
/p:PortableBuild=$(sb.portable) \
120
- /p:FailOnPrebuiltBaselineError=true
130
+ /p:FailOnPrebuiltBaselineError=true \
131
+ $poisonArg
121
132
displayName: Build tarball
122
133
timeoutInMinutes: 120
123
134
condition: and(succeeded(), eq(variables['sb.tarball'], true))
0 commit comments