Skip to content

Commit 61882d0

Browse files
committed
Remove ProdCon feed url in tarball smoke test
1 parent 5d26be6 commit 61882d0

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.vsts-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ phases:
9393
condition: and(succeeded(), eq(variables['buildOfflineTarball'], true))
9494

9595
# run smoke tests
96-
- script: $(docker.runInTarball) $(imageName) ./smoke-test.sh --minimal --projectOutput --configuration $(buildConfiguration)
96+
- script: $(docker.runInTarball) $(imageName) ./smoke-test.sh --minimal --projectOutput --configuration $(buildConfiguration) --prodConBlobFeedUrl ''
97+
displayName: Run smoke-test in tarball
9798
condition: and(succeeded(), eq(variables['buildOfflineTarball'], true))
9899

99100
# copy all tarball logs to working directory

smoke-test.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ function usage() {
4242
echo " --excludeLocalTests exclude tests that use local sources for nuget packages"
4343
echo " --excludeOnlineTests exclude test that use online sources for nuget packages"
4444
echo " --devCertsVersion <version> use dotnet-dev-certs <version> instead of default $DEV_CERTS_VERSION_DEFAULT"
45-
echo " --prodConBlobFeedUrl <url> override the prodcon blob feed specified in ProdConFeed.txt"
45+
echo " --prodConBlobFeedUrl <url> override the prodcon blob feed specified in ProdConFeed.txt, removing it if empty"
4646
echo " --archiveRestoredPackages capture all restored packages to $archivedPackagesDir"
4747
echo "environment:"
48-
echo " prodConBlobFeedUrl override the prodcon blob feed specified in ProdConFeed.txt"
48+
echo " prodConBlobFeedUrl override the prodcon blob feed specified in ProdConFeed.txt, removing it if empty"
4949
echo ""
5050
}
5151

@@ -267,7 +267,11 @@ function resetCaches() {
267267
}
268268

269269
function setupProdConFeed() {
270-
sed -i.bakProdCon "s|PRODUCT_CONTRUCTION_PACKAGES|$prodConBlobFeedUrl|g" "$testingDir/NuGet.Config"
270+
if [ "$prodConBlobFeedUrl" ]; then
271+
sed -i.bakProdCon "s|PRODUCT_CONTRUCTION_PACKAGES|$prodConBlobFeedUrl|g" "$testingDir/NuGet.Config"
272+
else
273+
sed -i.bakProdCon "/PRODUCT_CONTRUCTION_PACKAGES/d" "$testingDir/NuGet.Config"
274+
fi
271275
}
272276

273277
function setupSmokeTestFeed() {

0 commit comments

Comments
 (0)