Skip to content

Commit 3fb929d

Browse files
chore: Migrate gsutil usage to gcloud storage (#141)
1 parent 3f86a6c commit 3fb929d

6 files changed

+10
-10
lines changed

builds/infra-destroy-features-mesh-gateways.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ steps:
4545
- -c
4646
- |
4747
source vars.sh
48-
gsutil cp gs://config-management-release/released/latest/linux_amd64/nomos nomos
48+
gcloud storage cp gs://config-management-release/released/latest/linux_amd64/nomos nomos
4949
chmod +x nomos
5050
touch konfig && export KUBECONFIG=konfig
5151
while [[ $(gcloud container clusters list --project ${_PROJECT_ID} --filter "STATUS=RUNNING AND resourceLabels.env:prod" --format="value(name)"| wc -l | awk '{print $1}') != "6" ]]; do

builds/infra-features-gke-gateway.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ steps:
5050
echo -e "The ip address is $$GCLB_IP..."
5151
echo -e "Uploading the ip address to a cloud bucket"
5252
echo "$(echo "\"$$GCLB_IP\"")" > /tmp/ip-address
53-
gsutil -m -h "Content-Type: text/plain; charset=utf-8" cp /tmp/ip-address gs://${_PROJECT_ID}/platform-values/ip-address.json
53+
gcloud storage cp /tmp/ip-address "gs://${_PROJECT_ID}/platform-values/ip-address.json" --content-type="text/plain; charset=utf-8"
5454
rm /tmp/ip-address

builds/infra-features-gke-mesh-gateways-prod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ steps:
2929
- -c
3030
- |
3131
source vars.sh
32-
gsutil cp gs://config-management-release/released/latest/linux_amd64/nomos nomos
32+
gcloud storage cp gs://config-management-release/released/latest/linux_amd64/nomos nomos
3333
chmod +x nomos
3434
touch konfig && export KUBECONFIG=konfig
3535
while [[ $(gcloud container clusters list --project ${_PROJECT_ID} --filter "STATUS=RUNNING AND resourceLabels.env:prod" --format="value(name)"| wc -l | awk '{print $1}') != "6" ]]; do

builds/infra-features-gke-mesh-gateways.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ steps:
4141
- |
4242
export PROJECT_NUMBER=$(gcloud projects describe ${_PROJECT_ID} --format 'value(projectNumber)')
4343
echo -e "PROJECT_NUMBER is $${PROJECT_NUMBER}"
44-
gsutil cp gs://config-management-release/released/latest/linux_amd64/nomos nomos
44+
gcloud storage cp gs://config-management-release/released/latest/linux_amd64/nomos nomos
4545
chmod +x nomos
4646
git config --global user.email "cloudbuild-ci@cloudbuild.gserviceaccount.com"
4747
git config --global user.name "cloudbuild-ci"

builds/terraform/infra-create-gcs.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ steps:
2525
args:
2626
- -c
2727
- |
28-
([[ $(gsutil ls | grep "gs://${_PROJECT_ID}/") ]] || \
29-
gsutil mb -p ${PROJECT_ID} gs://${_PROJECT_ID}) && \
30-
([[ $(gsutil versioning get gs://${_PROJECT_ID} | grep Enabled) ]] || \
31-
gsutil versioning set on gs://${_PROJECT_ID})
28+
([[ $(gcloud storage ls | grep "gs://${_PROJECT_ID}/") ]] || \
29+
gcloud storage buckets create --project=${PROJECT_ID} gs://${_PROJECT_ID}) && \
30+
([[ $(gcloud storage buckets describe gs://${_PROJECT_ID} --format="default(versioning)" | grep Enabled) ]] || \
31+
gcloud storage buckets update --versioning gs://${_PROJECT_ID})

builds/terraform/infra-destroy-gcs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ steps:
2525
args:
2626
- -c
2727
- |
28-
([[ $(gsutil ls | grep "gs://${_PROJECT_ID}/") ]] && \
29-
gsutil rm -r -f ${_PROJECT_ID} gs://${_PROJECT_ID})
28+
([[ $(gcloud storage ls | grep "gs://${_PROJECT_ID}/") ]] && \
29+
gcloud storage rm --recursive --continue-on-error ${_PROJECT_ID} gs://${_PROJECT_ID})
3030

0 commit comments

Comments
 (0)