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 target to generate release manifests #6975

Closed
killianmuldoon opened this issue Jul 25, 2022 · 10 comments · Fixed by #7629
Closed

Add make target to generate release manifests #6975

killianmuldoon opened this issue Jul 25, 2022 · 10 comments · Fixed by #7629
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@killianmuldoon
Copy link
Contributor

Currently the only way to generate our release manifests with the CAPI Makefile is to run make release. Currently this runs the following targets:

	GIT_VERSION=$(RELEASE_TAG) $(MAKE) release-binaries
	# Set the manifest image to the production bucket.
	$(MAKE) manifest-modification REGISTRY=$(PROD_REGISTRY)
	## Build the manifests
	$(MAKE) release-manifests
	# Set the development manifest image to the staging bucket.
	$(MAKE) manifest-modification-dev REGISTRY=$(STAGING_REGISTRY)
	## Build the development manifests
	$(MAKE) release-manifests-dev
	## Clean the git artifacts modified in the release process
	$(MAKE) clean-release-git

With the first target - make release-binaries - taking by far the longest. We should introduce a way to simply generate the manifests without needing to create the binaries - i.e. introduce a target make release-manifests-all with the following targets:

release-manifests:
	# Set the manifest image to the production bucket.
	$(MAKE) manifest-modification REGISTRY=$(PROD_REGISTRY)
	## Build the manifests
	$(MAKE) release-manifests
	# Set the development manifest image to the staging bucket.
	$(MAKE) manifest-modification-dev REGISTRY=$(STAGING_REGISTRY)
	## Build the development manifests
	$(MAKE) release-manifests-dev
	## Clean the git artifacts modified in the release process
	$(MAKE) clean-release-git

Some additional restructuring could be done to combine the release-manifests-* and manifest-modification-* targets

And reduce the release target to:

	GIT_VERSION=$(RELEASE_TAG) $(MAKE) release-binaries
        $(MAKE) release-manifests-all

/kind cleanup

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jul 25, 2022
@killianmuldoon
Copy link
Contributor Author

/assign

@fabriziopandini fabriziopandini added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Jul 29, 2022
@fabriziopandini
Copy link
Member

/triage accepted

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Jul 29, 2022
@sbueringer
Copy link
Member

Fine for me. Let's just be careful that we don't change the outputs (e.g. before/after refactoring diff)

@fabriziopandini fabriziopandini added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Aug 26, 2022
@chiukapoor
Copy link
Contributor

Hello Team, As per my understanding we need to create a target release-manifests-all in Makefile so that the user can generate all the manifests independent of release-binaries

The expected content of release-manifest-all

cluster-api/Makefile

Lines 832 to 841 in 844eff2

# Set the manifest image to the production bucket.
$(MAKE) manifest-modification REGISTRY=$(PROD_REGISTRY)
## Build the manifests
$(MAKE) release-manifests
# Set the development manifest image to the staging bucket.
$(MAKE) manifest-modification-dev REGISTRY=$(STAGING_REGISTRY)
## Build the development manifests
$(MAKE) release-manifests-dev
## Clean the git artifacts modified in the release process
$(MAKE) clean-release-git

If no one is actively working on this issue, may I take it forward?

@killianmuldoon
Copy link
Contributor Author

Thanks for taking this up @chiukapoor !

/unassign
/assign @chiukapoor

@chiukapoor
Copy link
Contributor

I have made changes as per the issue description but having some doubts as if it is safe to run make release for testing purposes on the local environment. As per my understanding of the code there is no code/release push that is happening but just wanted to be sure before I proceed.

@chiukapoor
Copy link
Contributor

chiukapoor commented Nov 25, 2022

Hello @sbueringer, @fabriziopandini and @killianmuldoon, May you please help with the #6975 (comment) query

@killianmuldoon
Copy link
Contributor Author

killianmuldoon commented Nov 25, 2022

It should be fine to run make release locally to test your changes 🙂

@chiukapoor
Copy link
Contributor

Thank you, I will test things out and will create a PR.

@chiukapoor
Copy link
Contributor

chiukapoor commented Nov 25, 2022

@killianmuldoon, I have created the PR which adds make target release-manifests-all to generate all the release manifests independently of make release

While looking at release-manifests and release-manifests-dev targets, I couldn't find a way to combine them considering that both of them are using pretty different variables of folder paths. The same applies to manifest-modification-*. Please do let me know your views on this, probably there is something I may be missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants