Cloud-builders: [go] Add (back) image tag for Golang builder with value of `go version`

Created on 26 May 2018  路  3Comments  路  Source: GoogleCloudPlatform/cloud-builders

I have an issue that may be related to the version of go used by the go builder.

It's challenging to determine which go version is used by each of the images.

Please consider adding (back; last used for 1.9.4) the value of go version as a tag

gcloud container images list-tags gcr.io/cloud-builders/go
DIGEST        TAGS           TIMESTAMP
23ed51a7a770  debian         2018-05-26T01:33:17
e0e4b2baf00a  alpine,latest  2018-05-26T01:32:45
...
fc612e56b01c  1.9.4          2018-02-17T01:26:12

I checked the Go release page and picked a date for 1.10 after its release but this requires checking

gcloud container images list-tags gcr.io/cloud-builders/go
DIGEST        TAGS           TIMESTAMP
5821f0bf6207                 2018-03-01T02:21:06

gcloud container images list-tags gcr.io/cloud-builders/go \
--format='get(digest)' \
| grep 5821f0bf6207
sha256:5821f0bf620746b7bb209edc3c9b15cf4622e3816adb2e11f4ace53d20de37c8

and then revised cloudbuild.yaml to use this but it's hacky and error-prone:

steps:
- name: "gcr.io/cloud-builders/go@sha256:5821f0bf..."
  args: [
    "version"
  ]

Most helpful comment

How can you do this? Any updates?
Still can't find a way to use version number directly.

All 3 comments

Yes, how can we build with a specific go version? e.g. 1.11, 1.10...

https://console.cloud.google.com/gcr/images/cloud-builders/GLOBAL/go?gcrImageListsize=30 is missing all the necessary version tags.

How can you do this? Any updates?
Still can't find a way to use version number directly.

closing as obsolete; see https://github.com/GoogleCloudPlatform/cloud-builders/issues/677

Note that the golang image supports multiple versions of Go by tag.

Was this page helpful?
0 / 5 - 0 ratings