Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ else
fi
{% endif %}
echo -e "$GREEN Setting up Storage Bucket in project $PROJECT_ID $NC"
if !(gsutil ls -b gs://$STORAGE_BUCKET_NAME | grep --fixed-strings "$STORAGE_BUCKET_NAME"); then
if !(gcloud storage ls --buckets gs://$STORAGE_BUCKET_NAME | grep --fixed-strings "$STORAGE_BUCKET_NAME"); then

echo "Creating GS Bucket: ${STORAGE_BUCKET_NAME} in project $PROJECT_ID"
gsutil mb -l ${STORAGE_BUCKET_LOCATION} gs://$STORAGE_BUCKET_NAME
gcloud storage buckets create --location=${STORAGE_BUCKET_LOCATION} gs://$STORAGE_BUCKET_NAME

else

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/provisioning/gcloud_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
'my-branch', 'my-repo', 'cloud-source-repositories', 'us-central1', 'my-bucket',
True, 'my-vpc-connector', True,
['gcloud artifacts repositories create', 'gcloud iam service-accounts create',
'gsutil mb -l ${STORAGE_BUCKET_LOCATION} gs://$STORAGE_BUCKET_NAME', 'gcloud iam service-accounts create',
'gcloud storage buckets create gs://$STORAGE_BUCKET_NAME --location=${STORAGE_BUCKET_LOCATION}', 'gcloud iam service-accounts create',
'gcloud projects add-iam-policy-binding', 'gcloud source repos create', 'gcloud pubsub topics create',
'gcloud functions deploy', 'gcloud beta builds triggers create', 'gcloud scheduler jobs create pubsub',
'--vpc-connector=my-vpc-connector']
Expand All @@ -73,7 +73,7 @@
'my-branch', 'my-repo', 'cloud-source-repositories', 'us-central1', 'my-bucket',
True, 'No VPC Specified', True,
['gcloud artifacts repositories create', 'gcloud iam service-accounts create',
'gsutil mb -l ${STORAGE_BUCKET_LOCATION} gs://$STORAGE_BUCKET_NAME', 'gcloud iam service-accounts create',
'gcloud storage buckets create gs://$STORAGE_BUCKET_NAME --location=${STORAGE_BUCKET_LOCATION}', 'gcloud iam service-accounts create',
'gcloud projects add-iam-policy-binding', 'gcloud source repos create', 'gcloud pubsub topics create',
'gcloud builds submit ${BASE_DIR}services/submission_service', 'gcloud run deploy', 'gcloud pubsub subscriptions create',
'gcloud beta builds triggers create', 'gcloud scheduler jobs create pubsub']
Expand Down