-
Notifications
You must be signed in to change notification settings - Fork 90
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
transparently use docker targets when building #2519
Conversation
Skipping CI for Draft Pull Request. |
0c42773
to
621b53c
Compare
77b6c4c
to
2b8f18d
Compare
dc0c4d5
to
1dc551a
Compare
1dc551a
to
364eb62
Compare
25243e5
to
c684842
Compare
09fa217
to
e973c9f
Compare
/hold |
4b71b67
to
2a8a8c2
Compare
c6a755e
to
e0f7ab0
Compare
e0f7ab0
to
9ee7ea4
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhay-krishna 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 |
/test all |
/unhold |
Issue #, if available:
Description of changes:
We have traditionally relied on building our components on the host, which requires a fair amount of setup and dependencies. A while back we did introduce the
run-in-docker
target(s) to make it easier to run parts of the build locally and match checksums/attribution files by using a docker container running thebuilder-base
image which is what we run in prow/coudebuild. Recently we started using EKS-D golang builds which are only produced for linux so building on mac and matching checksums (which was possible before) is no longer possible. Using the builder-base docker approach has worked pretty well.This PR extends our use of these docker container by converting certain targets, go build/go licenses/attribution and some project specific targets, to use docker automatically if the required toolset is missing. In the case of golang, we just assume its missing since the likelihood of someone having install EKS-D go is not very high. This can be overridden if the developer wants to build on the host instead of the container.
The approach used in Common.mk to run the docker targets transparently is a bit hacky.... Its basically the same approach documented and taken in #2546. The good new is that for project Makefiles where we want to use docker if, say
npm
is missing in the case of the prometheus build, its a pretty simple change.I did go through and update the building-locally doc, in which I created and recreated AL2 and AL23 instances to confirm I had as much documented as I could find.
I did add a
build-all
target to the root Makefile, which I do not intend to be used anywhere but it is a nice helper when trying to validate that an instance has all the dependencies needed to build pretty much the entire stack.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.