Skip to content

Commit

Permalink
Add retry for workload identity binding
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobgy committed Apr 10, 2020
1 parent 8054924 commit 06ca56e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/deploy-pipeline-lite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ if [ "$ENABLE_WORKLOAD_IDENTITY" = true ]; then
# not add retry there. Also unless for testing scenario like this, it won't
# meet the concurrent change issue.
sleep $((RANDOM%30))
yes | PROJECT_ID=$PROJECT CLUSTER_NAME=$TEST_CLUSTER NAMESPACE=$NAMESPACE \
${DIR}/../manifests/kustomize/gcp-workload-identity-setup.sh
function setup_workload_identity {
yes | PROJECT_ID=$PROJECT CLUSTER_NAME=$TEST_CLUSTER NAMESPACE=$NAMESPACE \
${DIR}/../manifests/kustomize/gcp-workload-identity-setup.sh
}
retry setup_workload_identity

source "${DIR}/scripts/retry.sh"
retry gcloud projects add-iam-policy-binding $PROJECT \
Expand Down

0 comments on commit 06ca56e

Please sign in to comment.