kubevirt: make builder-build failed with go: command not found
What happened:
When I try to bump golang version refer to this doc: https://github.com/kubevirt/kubevirt/blob/main/docs/update-go-version.md
I change GIMME_GO_VERSION in hack/builder/Dockerfile and exec make builder-build.
It return
=> ERROR [ 8/17] RUN set -x && mkdir -p /go && source /etc/profile.d/gimme.sh && go install -v golang.org/x/tools/cmd/goimports@d5fe738 && go install -v mvdan.cc/sh/v3/cmd/shfmt@v3.1. 0.4s
------
> [ 8/17] RUN set -x && mkdir -p /go && source /etc/profile.d/gimme.sh && go install -v golang.org/x/tools/cmd/goimports@d5fe738 && go install -v mvdan.cc/sh/v3/cmd/shfmt@v3.1.1 && go install -v k8s.io/code-generator/cmd/deepcopy-gen@v0.20.2 && go install -v k8s.io/code-generator/cmd/defaulter-gen@v0.20.2 && go install -v k8s.io/kube-openapi/cmd/openapi-gen@30be4d1 && go install -v github.com/golang/protobuf/protoc-gen-go@1643683 && go install -v k8s.io/code-generator/cmd/client-gen@v0.20.2 && go install -v github.com/securego/gosec/v2/cmd/gosec@0ce48a5 && go install -v sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.0 && go clean -cache -modcache:
#0 0.312 + mkdir -p /go
#0 0.315 + source /etc/profile.d/gimme.sh
#0 0.315 + go install -v golang.org/x/tools/cmd/goimports@d5fe738
#0 0.316 /bin/sh: line 1: go: command not found
What you expected to happen:
make builder-build run without err
How to reproduce it (as minimally and precisely as possible): Steps to reproduce the behavior.
Additional context:
Add any other context about the problem here.
Environment:
- KubeVirt version (use
virtctl version): 0.59 - Kubernetes version (use
kubectl version): N/A - VM or VMI specifications: N/A
- Cloud provider or hardware configuration: N/A
- OS (e.g. from /etc/os-release): N/A
- Kernel (e.g.
uname -a): N/A - Install tools: N/A
- Others: N/A
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (10 by maintainers)
You will probably need to backport changes from the following PRs to get this working: https://github.com/kubevirt/kubevirt/pull/10879 https://github.com/kubevirt/kubevirt/pull/10914