Skip to content

Release Process

Salim Afiune Maya edited this page May 26, 2020 · 15 revisions

Follow these instructions to create a new release of this repository! πŸ’―

Prepare Release

Releases must be generated from the master branch, make sure that your local master
branch is up-to-date, then run the command:

$ make release-prepare
...
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
remote:
remote: Create a pull request for 'release' on GitHub by visiting:
remote:      https://github.com/lacework/go-sdk/pull/new/release
remote:
To github.com:lacework/go-sdk.git
 * [new branch]      release -> release
--> go-sdk:
--> go-sdk: Follow the above url and open a pull request

The release-prepare make command generates the release notes at RELEASE_NOTES.md,
updates the CHANGELOG.md and removes the -dev tag from the VERSION file.

This step requires human intervention to update and/or add relevant documentation to
the release notes, look at previous releases for guidance:

Once you've finished updating and polishing the release notes and changelog, open a
Pull Request by following the URL:

Use the content of the RELEASE_NOTES.md as the description of the PR. Here is an
example of how the PR should look like: https://github.com/lacework/go-sdk/pull/116

This will allow team members to do any final review, wait for at least one approval,
then proceed to merge! πŸ™ŒπŸ½ :shipit: ✨

Publish Release

To publish a release make sure you have finished the Prepare Release section, and
that your local master branch includes the Release vX.Y.Z commit.

$ git log --oneline
d9ef289 Release v0.1.13 (#116)
...

Now, proceed to execute the command make release-publish from the master branch,
this command will build cross-platform binaries, generate sha256sum hashes and create
a github tag like v0.1.0:

$ make release-publish
...
--> go-sdk: compressing target binaries
--> go-sdk: generating sha256sum Hashes
--> go-sdk: creating github tag: v0.1.13
Total 0 (delta 0), reused 0 (delta 0)
To github.com:lacework/go-sdk.git
 * [new tag]         v0.1.13 -> v0.1.13
--> go-sdk: go to https://github.com/lacework/go-sdk/releases/tag/v0.1.13 and upload all files from 'bin/'

Open the link provided by the command πŸ‘†πŸ½ and click "edit tag" to convert the tag into a
release, update the release title with the tag name and the description using the content
of the RELEASE_NOTES.md, finally, upload all files generated inside the bin/ folder
and click "publish release". πŸŽ†

Build and Publish Docker Images

After publishing a new release, we need to rebuild and publish all our docker images, run
the following command from the root of the repository:

NOTE: This step could take some time to run depending on your internet speed.

$ make release-containers
...
--> lacework-cli: releasing container from SCRATCH
--> lacework-cli: releasing container for ubi-8
--> lacework-cli: releasing container for centos-8
--> lacework-cli: releasing container for debian-10
--> lacework-cli: releasing container for ubuntu-1804
--> lacework-cli: releasing container for amazonlinux-2
--> lacework-cli: creating docker manifest
--> lacework-cli: pushing docker manifest
--> lacework-cli: All docker containers have been released! (https://hub.docker.com/repository/docker/techallylw/lacework-cli)

Update Version: Add -dev Tag

Make sure to update the version (and add the -dev tag) to finalize the release process:

make release-patch-version
Clone this wiki locally