Skip to content

Commit d027f7f

Browse files
committed
Specify SA for nested GCB
1 parent 4e13ed5 commit d027f7f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cloudbuild/gpu-image-builder/build_packer_builder.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Builds the custom Packer Cloud Build builder if it doesn't exist.
44
# https://docs.cloud.google.com/build/docs/building/build-vm-images-with-packer
55

6-
set -euo pipefail
6+
set -xeuo pipefail
77

88
PROJECT_ID="${1}"
99
PACKER_BUILDER_IMAGE="gcr.io/${PROJECT_ID}/packer"
@@ -14,7 +14,7 @@ else
1414
echo "Packer builder image not found. Building it now..."
1515
git clone https://github.com/GoogleCloudPlatform/cloud-builders-community.git --depth=1
1616
cd cloud-builders-community/packer
17-
gcloud builds submit --project="${PROJECT_ID}" .
17+
gcloud builds submit --project="${PROJECT_ID}" --service-account=projects/stackdriver-test-143416/serviceAccounts/build-and-test@stackdriver-test-143416.iam.gserviceaccount.com .
1818
cd -
1919
echo "Packer builder image built."
2020
fi

0 commit comments

Comments
 (0)