Configure pipeline to run offline correctly (#18304)
This commit is contained in:
parent
9b36bbc4ab
commit
48271da430
1 changed files with 8 additions and 4 deletions
|
@ -228,8 +228,6 @@ jobs:
|
|||
customBuildArgs="--ci"
|
||||
if [[ '${{ parameters.runOnline }}' == 'True' ]]; then
|
||||
customBuildArgs="$customBuildArgs --online"
|
||||
else
|
||||
customRunArgs="$customRunArgs --network none"
|
||||
fi
|
||||
|
||||
if [[ '${{ parameters.enablePoison }}' == 'True' ]]; then
|
||||
|
@ -267,10 +265,16 @@ jobs:
|
|||
|
||||
# Only use Docker stuff on Linux
|
||||
if [[ "$useDocker" == "true" ]]; then
|
||||
customDockerRunArgs=""
|
||||
for envVar in $customEnvVars; do
|
||||
customEnvVarsWithDockerSyntax="$customEnvVarsWithDockerSyntax -e $envVar"
|
||||
customDockerRunArgs="$customDockerRunArgs -e $envVar"
|
||||
done
|
||||
docker run --rm -v "$(sourcesPath):/vmr" -w /vmr $customEnvVarsWithDockerSyntax ${{ parameters.container }} ./build.sh --clean-while-building $(additionalBuildArgs) $customBuildArgs $extraBuildProperties
|
||||
|
||||
if [[ '${{ parameters.runOnline }}' == 'False' ]]; then
|
||||
customDockerRunArgs="$customDockerRunArgs --network none"
|
||||
fi
|
||||
|
||||
docker run --rm -v "$(sourcesPath):/vmr" -w /vmr $customDockerRunArgs ${{ parameters.container }} ./build.sh --clean-while-building $(additionalBuildArgs) $customBuildArgs $extraBuildProperties
|
||||
else
|
||||
for envVar in $customEnvVars; do
|
||||
customEnvVarsWithBashSyntax="$customEnvVarsWithBashSyntax export $envVar;"
|
||||
|
|
Loading…
Reference in a new issue