File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55# The auto-build will be skipped if no new commits since last deployment.
66
77steps :
8+ # Step 0: Poll for the provenance
9+ - name : gcr.io/cloud-builders/gcloud
10+ entrypoint : ' /bin/bash'
11+ args :
12+ - ' -c'
13+ - |-
14+ echo "Waiting for provenance to be indexed by Google..."
15+ # Loop for up to 2 minutes
16+ for i in {1..12}; do
17+ if gcloud artifacts docker images describe \
18+ us-docker.pkg.dev/$PROJECT_ID/appengine/default.version-$SHORT_SHA:latest \
19+ --show-provenance > /dev/null 2>&1; then
20+ echo "Provenance is ready!"
21+ exit 0
22+ fi
23+ echo "Not ready yet (Attempt $i/12). Sleeping 10s..."
24+ sleep 10
25+ done
26+ echo "ERROR: Provenance never appeared."
27+ exit 1
28+
829 # Get recently pushed docker image and associated provenance, along with the
930 # correct docker digest url, including the hash.
1031 - name : gcr.io/cloud-builders/gcloud
Original file line number Diff line number Diff line change 55# The auto-build will be skipped if no new commits since last deployment.
66
77steps :
8+ # Step 0: Poll for the provenance
9+ - name : gcr.io/cloud-builders/gcloud
10+ entrypoint : ' /bin/bash'
11+ args :
12+ - ' -c'
13+ - |-
14+ echo "Waiting for provenance to be indexed by Google..."
15+ # Loop for up to 2 minutes
16+ for i in {1..12}; do
17+ if gcloud artifacts docker images describe \
18+ us-docker.pkg.dev/$PROJECT_ID/appengine/auto-submit.version-$SHORT_SHA:latest \
19+ --show-provenance > /dev/null 2>&1; then
20+ echo "Provenance is ready!"
21+ exit 0
22+ fi
23+ echo "Not ready yet (Attempt $i/12). Sleeping 10s..."
24+ sleep 10
25+ done
26+ echo "ERROR: Provenance never appeared."
27+ exit 1
28+
829 # Get recently pushed docker image and associated provenance, along with the
930 # correct docker digest url, including the hash.
1031 - name : gcr.io/cloud-builders/gcloud
You can’t perform that action at this time.
0 commit comments