mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-07-28 07:31:29 -07:00
feat: add support for using application default credentials when running integration tests
This commit is contained in:
parent
611e6d96db
commit
bf74697b3f
90 changed files with 856 additions and 793 deletions
|
@ -40,12 +40,15 @@ for SERVICE in "${SERVICE_LIST[@]}"; do
|
|||
gcloud services enable "$SERVICE" --project="$PROJECT_ID"
|
||||
done
|
||||
|
||||
for ROLE in "${REQUIRED_ROLE_LIST[@]}"; do
|
||||
echo "enabling role $ROLE..."
|
||||
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
|
||||
--member="serviceAccount:$SERVICE_ACCOUNT_NAME" \
|
||||
--role="$ROLE"
|
||||
done
|
||||
if [ -n "$SERVICE_ACCOUNT_NAME" ]
|
||||
then
|
||||
for ROLE in "${REQUIRED_ROLE_LIST[@]}"; do
|
||||
echo "enabling role $ROLE..."
|
||||
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
|
||||
--member="serviceAccount:$SERVICE_ACCOUNT_NAME" \
|
||||
--role="$ROLE"
|
||||
done
|
||||
fi
|
||||
|
||||
if ! gcloud app describe --project="$PROJECT_ID" > /dev/null; then
|
||||
echo "creating appengine project..."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue