-
Notifications
You must be signed in to change notification settings - Fork 38.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pause: containerize wincat build #125105
pause: containerize wincat build #125105
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BenTheElder 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:
Approvers can indicate their approval by writing |
CGO_ENABLED=0 GOOS=windows GOARCH=${ARCH} go build -o $@ $^ | ||
mkdir -p bin | ||
docker run --rm -u $$(id -u):$$(id -g) -v $$(pwd):/build \ | ||
--tmpfs /.cache \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this because /.cache is only owned by root
TODO: we should probably consider making kube-cross make /.cache owned by all users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(also kubernetes/release#2706)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah no, /.cache doesn't exist but go is putting it there ... looking more ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem is this image has HOME=/
(??)
(which then makes caches /.cache/
since that's $HOME/.cache, and /
is of course only owned by root)
$(KUBE_CROSS_IMAGE):$(KUBE_CROSS_VERSION) \ | ||
/bin/bash -c "\ | ||
cd /build && \ | ||
CGO_ENABLED=0 GOOS=windows GOARCH=${ARCH} go build -o $@ $^" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO (maybe): plumb through GOTOOLCHAIN so this works even if we haven't bumped kube-cross yet but did bump .go-version.
OTOH: if we start using toolchain
in the modules / workspace then this is just another place we'll have to remove it, and right now we do update kubecross
/kind bug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 7cdafcb926a115845d831a164245d4aa19ae608e
|
What type of PR is this?
What this PR does / why we need it:
Uses kube-cross to build the wincat binary, to help make sure we're using the right go version etc and avoid depending on the GCB environment (which should also make builds easier to reproduce locally)
Which issue(s) this PR fixes:
This is #125099 but I'm not making it auto-close the issue until we have a build :-)
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: