diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f74f80c42b6db..76ec9313aad24 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -131,6 +131,7 @@ jobs: steps: - template: ci/checkout-template.yml - template: ci/install-package-dependencies.yml + - bash: util/prep-bazel-airgapped-build.sh - bash: ci/scripts/test-airgapped-build.sh - job: slow_lints diff --git a/ci/scripts/test-airgapped-build.sh b/ci/scripts/test-airgapped-build.sh index 7604c288ac5d5..fbf52c4dec551 100755 --- a/ci/scripts/test-airgapped-build.sh +++ b/ci/scripts/test-airgapped-build.sh @@ -5,8 +5,11 @@ set -ex -# Prefetch bazel airgapped dependencies. -util/prep-bazel-airgapped-build.sh -f +# Prefetch bazel airgapped dependencies if not already done. +if [ ! -d bazel-airgapped ]; then + echo "Airgapped environment not found, preparing..." >&2 + util/prep-bazel-airgapped-build.sh -f +fi # Remove the airgapped network namespace. remove_airgapped_netns() {