Skip to content

Commit 81ca00d

Browse files
authored
[release/2.1] Split smoke test prebuilts out of main tarball (#704)
* Split smoke test prebuilts out of main tarball * Explain tarball creation commands
1 parent 7740559 commit 81ca00d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,19 @@ phases:
129129
130130
# tar the tarball directory into the drop directory.
131131
- script: |
132-
$(docker.run) $(docker.tb.map) $(docker.drop.map) $(imageName) /bin/bash -c '
132+
$(docker.run) $(docker.tb.map) $(docker.drop.map) $(docker.tb.work) $(imageName) /bin/bash -c '
133133
mkdir -p /drop/tarball/
134-
tar -zcf "/drop/tarball/$(tarballName).tar.gz" "/tb/$(tarballName)"'
134+
smokeTestPackages="$(tarballName)/prebuilt/smoke-test-packages"
135+
# smokeTestPackages is a package cache, with redundant data and unnecessary structure. E.g.
136+
# $smokeTestPackages/name/version/name.version.nupkg <- We want this.
137+
# $smokeTestPackages/name/version/lib/net46/name.dll <- This is already in the nupkg.
138+
# This find moves the nupkg files into $smokeTestPackages:
139+
find "$smokeTestPackages" -iname "*.nupkg" -exec mv {} "$smokeTestPackages" \;
140+
# This find removes all non-nupkg files, which are not wanted:
141+
find "$smokeTestPackages" -not -iname "*.nupkg" -delete
142+
# Make one .tar.gz for build, another for extras necessary to smoke test:
143+
tar --numeric-owner "--exclude=$smokeTestPackages" -zcf "/drop/tarball/$(tarballName).tar.gz" "$(tarballName)"
144+
tar --numeric-owner -zcf "/drop/tarball/$(tarballName)-smoke-test-prereqs.tar.gz" "$smokeTestPackages"'
135145
displayName: Copy tarball to output
136146
condition: and(succeeded(), eq(variables['buildOfflineTarball'], true))
137147

0 commit comments

Comments
 (0)