kubernetes-csi / csi-release-tools

shared build and test files used by kubernetes-csi projects
Apache License 2.0
21 stars 71 forks source link

Use .go-version to get Kubernetes go version #249

Closed jsafrane closed 4 months ago

jsafrane commented 4 months ago

Kubernetes publishes .go-version since v1.26.1. Use it to get Kubernete's go version instead of parsing a shell script. Fall back to parsing of hack/lib/golang.sh if .go-version does not exist.

Fixes: https://github.com/kubernetes-csi/csi-release-tools/issues/248

Use .go-version file from github.com/kubernetes/kubernetes (k/k) to detect go version that k/k needs.
jsafrane commented 4 months ago

/retest

jsafrane commented 4 months ago

I updated the PR to fall back to the original behavior when .go-version does not exist.

xing-yang commented 4 months ago

1.29 job passed: https://github.com/kubernetes-csi/external-snapshotter/pull/1018

xing-yang commented 4 months ago

/lgtm /approve

k8s-ci-robot commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jsafrane, xing-yang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-csi/csi-release-tools/blob/master/OWNERS)~~ [jsafrane,xing-yang] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment