gcr.io/cloud-builders/gsutil
gsutil has had a bug for a couple of days. it has been fixed as of today, but will take a while to get into gcloud. Because of this many builds using the latest image of gsutil will fail. It would be super helpful to be able to use previous images using a version number.
The only choice you have is to create a custom container with the gsutil packaged in, which if I have to do, I might as well not use these prebuilt images.
Appreciate your feedback! Thanks!
I'm having the exact same problem. It could be a solution to let us add the hash from this list
https://console.cloud.google.com/gcr/images/cloud-builders/GLOBAL/gsutil
to cloud build like
# Sync with Cloud Storage
- name: gcr.io/cloud-builders/gsutil:[version hash]
args: ["-m", "rsync", "-r", "-c", "-d", "tempproject/staticfiles", "gs://bucket_eu/develop"]
I believe the google/cloud-sdk image also contains gsutil, and is updated more quickly. Versioned tags are also available.
https://hub.docker.com/r/google/cloud-sdk/
- name: google/cloud-sdk:252.0.0-slim
args: ['gsutil', 'ls']
Let me know if that works for you.
# Sync with Cloud Storage
- name: google/cloud-sdk:251.0.0-slim
args: ["gsutil", "-m", "rsync", "-r", "-c", "-d", "tempproject/staticfiles", "gs://bucket_eu/develop"]
worked for me !
@ImJasonH this is actually super helpful because with a versioned imaged, I have less concern that my builds will break due to dependencies. I can manually upgrade the version if I want from time to time, but at least I won't get random surprises. I will probably use these docker image going forward since they offer this better control, but I still think cloud builder images should support versioning like @jakobholmelund suggested.
Thanks for your quick reply!
Only downside is that the builds take a bit longer
Most helpful comment
I'm having the exact same problem. It could be a solution to let us add the hash from this list
https://console.cloud.google.com/gcr/images/cloud-builders/GLOBAL/gsutil
to cloud build like