Skip to content
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

Add make all-push rule #228

Merged
merged 2 commits into from
Dec 9, 2021
Merged

Conversation

wongma7
Copy link
Contributor

@wongma7 wongma7 commented Dec 8, 2021

Is this a bug fix or adding new feature?

What is this PR about? / Why do we need it? The make all-puish rule makes build procedure consistent with https://github.com/kubernetes-sigs/aws-ebs-csi-driver. I do NOT want to import the complicated low-level manifest manipulation from Makefile of https://github.com/kubernetes-sigs/aws-ebs-csi-driver because it is not necessary for building non-windows images. However the top-level make rules like all-push and variables like REGISTRY/TAG should be consistent.

What testing is done?

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 8, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wongma7

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 8, 2021
@wongma7 wongma7 changed the title Add make all-push rule WIP Add make all-push rule Dec 8, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 8, 2021
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 8, 2021
@wongma7 wongma7 changed the title WIP Add make all-push rule Add make all-push rule Dec 9, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 9, 2021
sub-image-%:
$(MAKE) OUTPUT_TYPE=$(call word-hyphen,$*,1) OS=$(call word-hyphen,$*,2) ARCH=$(call word-hyphen,$*,3) OSVERSION=$(call word-hyphen,$*,4) image

image: .image-$(TAG)-$(OS)-$(ARCH)-$(OSVERSION)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to document the targets intended to be run by command line like make all-image-docker (I guess you don't expect anyone to call make image TAG=.. OS=.. ARCH=..?). Also, all of these targets should be .PHONY, right? Lastly, might want a check for these variables to be set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the main userfacing ones should be make all and make all-push (which is executed by github workflow). But make image has a usecase during CI when we want to only build linux/amd64

The vars are always defaulted by ?=

And i know i can mark them phony but it's annoying to do it for every rule. in particular, the .image should not be phony because it touches a file at the end so that the same image for the same tag+os+arch is not built again

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHONY'd the rules I could in 2 nd commit xd

@nckturner
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 9, 2021
@k8s-ci-robot k8s-ci-robot merged commit f7fad71 into kubernetes-sigs:master Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants