jenkins-x/jx

Wrong go version in go binary

ankitm123 opened this issue · 5 comments

(base) ➜  ~ jx version
version: 3.6.15
shaCommit: eb83bbc137fb242efd6b1f3b9f70a45eca47852c
buildDate: Sat Oct  1 11:38:04 UTC 2022
goVersion: 1.18.1
branch: main
gitTreeState: clean

go version should be 1.18.6, but it says 1.18.1

Seems like the issue is because we are using go-releaser, which uses 1.18.1:

uses: docker://goreleaser/goreleaser:v1.8.3

There is an option to use custom gobinary in goreleaser

https://goreleaser.com/customization/verifiable_builds/?h=gobinary

Also, the jx3-pipeline-catalog has hardcoded go binary: https://github.com/jenkins-x/jx3-pipeline-catalog/blob/66ade1f974299c12f4ae3d4ef08770a2549d422d/tasks/go-plugin/release.yaml#L114

Instead do this:

export GOVERSION="$(go version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/')"

Re-opening, as it's not fixed yet.