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

Document release process #768

Merged
merged 1 commit into from
Mar 6, 2019
Merged

Conversation

chuckha
Copy link
Contributor

@chuckha chuckha commented Feb 22, 2019

Signed-off-by: Chuck Ha [email protected]

What this PR does / why we need it:
This PR documents the release process for this repository. The eventual goal is to understand the pieces of release and come up with automated systems. There is potential for sharing this work

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #764
Related to #732

Special notes for your reviewer:
This is a best guess at how release works.

NONE

/cc @roberthbailey

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 22, 2019
@detiber
Copy link
Member

detiber commented Feb 22, 2019

/assign @roberthbailey


1. Push a git tag
2. Build and push the container image with `make docker-push`. Note: This
container registry has extremely limited access. You likely do not have
Copy link
Contributor

Choose a reason for hiding this comment

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

Can/should we link to documentation on who has authority?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd guess @roberthbailey knows and can help provide additional context to this document

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chuckha, vincepri

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 26, 2019
# Process

1. Push a git tag
2. Build and push the container image with `make docker-push`. Note: This
Copy link
Contributor

Choose a reason for hiding this comment

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

You either need to set CONTROLLER_IMG before running the make command or edit the Makefile so that the pushed image has the correct tag.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we have to do a PR dance to cut a release (to embed version numbers) then it might make sense to have that include editing the version in the Makefile too).


# Process

1. Push a git tag
Copy link
Contributor

Choose a reason for hiding this comment

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

Also need to set the image version in the generated yaml so that when the providers vendor the git tag their will start the correct container image.

See #635

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 27, 2019
@chuckha
Copy link
Contributor Author

chuckha commented Feb 27, 2019

@roberthbailey thank you for the feedback! I updated the pr, ptal


## Process

1. Create a pull request that contains two changes:
Copy link
Contributor

Choose a reason for hiding this comment

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

For Velero, we use goreleaser and have a custom script that executes at release time (after the git tag has been created) that uses sed to find/replace :latest with the appropriate version string to match the git tag. That way, we don't have to open a PR, cut the release, then revert the PR. Would you be interested in exploring something like this down the road?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think anything that reduces the number of steps involved with releasing should be considered. I'll add a note in the Cluster API Provider Releases doc about goreleaser.

1. Create a pull request that contains two changes:
1. Change [the cluster api controller manager image
tag][managerimg] from `:latest` to whatever version is being released
2. Change the `CONTROLLER_IMAGE` variable in the [Makefile][makefile] to the
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean CONTROLLER_IMG?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, that's the variable name

## Process

1. Create a pull request that contains two changes:
1. Change [the cluster api controller manager image
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we get a Makefile target that can make these changes, and second target to undo them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, this PR dance is by far the most onerous part of the release process.

Copy link
Contributor

Choose a reason for hiding this comment

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

It reminds me of Maven releases 😄

@ncdc
Copy link
Contributor

ncdc commented Mar 5, 2019

@roberthbailey @chuckha what's left to get this merged?

@ncdc ncdc mentioned this pull request Mar 5, 2019
@chuckha
Copy link
Contributor Author

chuckha commented Mar 5, 2019

@ncdc I'm waiting for @roberthbailey's feedback. I've only written down what I can assume are the steps to releasing, he's the only one (?) that's done it and I'd like this document to reflect the real process.

Copy link
Contributor

@roberthbailey roberthbailey left a comment

Choose a reason for hiding this comment

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

Sorry for the delay. I think most of the steps are covered, just missing the line item for generating release notes.

6. Open a pull request with the revert change
7. Get that pull request merged
8. Create a release in github based on the tag created above

Copy link
Contributor

Choose a reason for hiding this comment

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

Step 9 is to write release notes. Right now this is also a very manual process. For https://github.com/kubernetes-sigs/cluster-api/releases/tag/0.0.0-alpha.3 I basically went through all of the PRs that had merged since the prior release and manually curated the release notes. It's onerous, but the script in the k/k repo that does it didn't seem like it would work out of the box even though we use the same release notes block in our PRs. As you can tell, when I cut https://github.com/kubernetes-sigs/cluster-api/releases/tag/0.0.0-alpha.4 during kubecon I didn't have the time to make similarly thorough release notes.

I've filed #327 to track building better automation for release note generation.


### Permissions

Releasing requires a particular set of permissions.
Copy link
Contributor

Choose a reason for hiding this comment

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

It sounds like this will change soon with the community owns staging buckets and the image promoter automation that is being built. But for now, this is how it's done.

@ncdc
Copy link
Contributor

ncdc commented Mar 6, 2019

/milestone v1alpha1

@k8s-ci-robot k8s-ci-robot added this to the v1alpha1 milestone Mar 6, 2019
@detiber
Copy link
Member

detiber commented Mar 6, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 6, 2019
@chuckha
Copy link
Contributor Author

chuckha commented Mar 6, 2019

/retest

@k8s-ci-robot k8s-ci-robot merged commit bf5d7f4 into kubernetes-sigs:master Mar 6, 2019
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document current release process
7 participants