Skip to content

Commit 53fcee2

Browse files
chore: Migrate gsutil usage to gcloud storage
1 parent ecfdcf0 commit 53fcee2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ default:
1414
# We assume that the file exists in the bucket.
1515
# See the rule below for how to create the image.
1616
go-image.tar.gz:
17-
gsutil cp gs://go-ecosystem/$@ $@
17+
gcloud storage cp gs://go-ecosystem/$@ $@
1818

1919
# Use this rule to build a go image for a specific Go version.
2020
# E.g.
2121
# make go-image-1.19.4.tar.gz
2222
# To change the sandbox image permanently, copy it to GCP:
2323
#
24-
# gsutil cp go-image.1.19.4.tar.gz gs://go-ecosystem/go-image.tar.gz
24+
# gcloud storage cp go-image.1.19.4.tar.gz gs://go-ecosystem/go-image.tar.gz
2525
# Then delete the local copy.
2626
go-image-%.tar.gz:
2727
docker export $(shell docker create golang:$*) | gzip > go-image-$*.tar.gz
@@ -37,8 +37,8 @@ go-image-%.tar.gz:
3737
# This directory must live in the repo directory so that cmd/worker/Dockerfile
3838
# can access it.
3939
go-vulndb:
40-
gsutil -m -q cp -r gs://go-vulndb .
41-
gsutil stat gs://go-vulndb/index.json | \
40+
gcloud storage cp --recursive gs://go-vulndb .
41+
gcloud storage objects list --stat --fetch-encrypted-object-hashes gs://go-vulndb/index.json | \
4242
awk '$$1 == "Update" { for (i = 4; i <= NF; i++) printf("%s ", $$i); printf("\n"); }' \
4343
> go-vulndb/LAST_MODIFIED
4444

deploy/worker.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ steps:
6464
6565
# Download the vuln DB from its bucket to a local directory, and remember
6666
# its last-modified time in a file.
67-
gsutil -m -q cp -r gs://go-vulndb /workspace
68-
gsutil stat gs://go-vulndb/index.json | \
67+
gcloud storage cp --recursive gs://go-vulndb /workspace
68+
gcloud storage objects list --stat --fetch-encrypted-object-hashes gs://go-vulndb/index.json | \
6969
awk '$$1 == "Update" { for (i = 4; i <= NF; i++) printf("%s ", $$i); printf("\n"); }' \
7070
> /workspace/go-vulndb/LAST_MODIFIED
7171
# Download a tarball of a docker Go image.
72-
gsutil cp gs://go-ecosystem/go-image.tar.gz /workspace
72+
gcloud storage cp gs://go-ecosystem/go-image.tar.gz /workspace
7373
7474
- id: Build
7575
# Build the docker image.

0 commit comments

Comments
 (0)