-
Notifications
You must be signed in to change notification settings - Fork 254
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
Fix Makefile to take vaules from ENV VAR values #351
Fix Makefile to take vaules from ENV VAR values #351
Conversation
[eduardo@fedora-32-ws node-feature-discovery]$ IMAGE_BUILD_CMD="podman build" make image
nfd-worker-daemonset.yaml: namespace: kube-system
nfd-worker-daemonset.yaml: image: k8s.gcr.io/nfd/node-feature-discovery:v0.6.0-32-g900c20e
nfd-daemonset-combined.yaml: namespace: kube-system
nfd-daemonset-combined.yaml: image: k8s.gcr.io/nfd/node-feature-discovery:v0.6.0-32-g900c20e
nfd-worker-job.yaml: namespace: kube-system
nfd-worker-job.yaml: image: k8s.gcr.io/nfd/node-feature-discovery:v0.6.0-32-g900c20e
nfd-master.yaml: namespace: kube-system
nfd-master.yaml: image: k8s.gcr.io/nfd/node-feature-discovery:v0.6.0-32-g900c20e
docker build --build-arg VERSION=v0.6.0-32-g900c20e \
--build-arg HOSTMOUNT_PREFIX=/host- \
-t k8s.gcr.io/nfd/node-feature-discovery:v0.6.0-32-g900c20e \
./
make: docker: Command not found
make: *** [Makefile:47: image] Error 127 |
/assign @marquiz |
/assign @marquiz |
With the current Makefile you need to use overrides, like:
So I would say this PR rather changes the handling of variables than fixes something that is broken. Nevertheless, this might be a rational change, making customized build possibly a bit less surprsing for users. But, in that case we should change the handling of all variables mentioned in the README in a similar fashion. Also, the commit message subject must be changed to something like
|
Thanks for the review, I applied the same logic to all the variables that can be defined pre-running the |
a6e16bd
to
a78ed89
Compare
a78ed89
to
96c014c
Compare
Makefile
Outdated
IMAGE_TAG_NAME := $(VERSION) | ||
IMAGE_EXTRA_TAG_NAMES := | ||
IMAGE_EXTRA_TAG_NAMES ?= |
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.
IMAGE_TAG_NAME
should also be initialized with =?
96c014c
to
1863833
Compare
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.
Two small comments.
In addition, please change the commit message to something I outlined in the previous review. I.e. change the formatting a bit and change the message to correspond the reality 😄
Will do thanks. yeah you are right, some times I just get used to small quick messages, but good strong messages are good for maintenance in the long run |
1863833
to
6cdf681
Compare
Thanks, the mismatch with the reality of the previous version was quite strong 😉 The commit messages do not always to be super long, even though too long commit messages are rarely a problem. There's still one unaddressed comment |
make image and make push fails when trying to use an ENV VAR value, as it is now they can only be overrided. the Var modified are GO_CMD GO_FMT IMAGE_BUILD_EXTRA_OPTS IMAGE_BUILD_CMD IMAGE_PUSH_CMD IMAGE_TAG_NAME IMAGE_REGISTRY IMAGE_NAME IMAGE_EXTRA_TAG_NAMES K8S_NAMESPACE HOSTMOUNT_PREFIX This new behaviour has also been updated on the README. Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
6cdf681
to
4bcb0cf
Compare
done |
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.
Thanks @ArangoGutierrez !
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ArangoGutierrez, marquiz 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 |
make image and make push fails when trying to set a diff value to
IMAGE_BUILD_CMD, runing the default value
Signed-off-by: Carlos Eduardo Arango Gutierrez carangog@redhat.com