Cloud-builders: Allow users to use different versions of builders

Created on 2 Jul 2019  路  5Comments  路  Source: GoogleCloudPlatform/cloud-builders

Affected builder image

gcr.io/cloud-builders/gsutil

Issue is not with image, but with the packaged tool. see https://github.com/GoogleCloudPlatform/gsutil/issues/806 However, this poses an overall design issue with the way these images are being utilized.

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!

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

# Sync with Cloud Storage
- name: gcr.io/cloud-builders/gsutil:[version hash]
  args: ["-m", "rsync", "-r", "-c", "-d", "tempproject/staticfiles", "gs://bucket_eu/develop"]

All 5 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

namtzigla picture namtzigla  路  3Comments

leighmcculloch picture leighmcculloch  路  5Comments

yungchin picture yungchin  路  10Comments

tombiscan picture tombiscan  路  4Comments

DocBradfordSoftware picture DocBradfordSoftware  路  7Comments