This document describes the release process for Layer0.
Layer0 follows the branching workflow as described by the Git Flow model. This model ensures that the master
branch is always in a production-ready state.
The basic branching workflow is:
<feature branches> -> develop -> release -> master
Before starting the release process, make sure to check the following items:
- Has all the relevant documentation been updated?
- Have all the necessary pull requests been merged?
- Does a release branch already exist? It should have been removed after the last release.
- Do you have the layer0 repository cloned locally?
The following section describes the entire workflow for releasing a new Layer0 version.
Run these commands in the your local layer0
repository to create the release
branch:
# Checkout latest version of the develop branch
git fetch origin
git checkout remotes/origin/develop
# Create the release branch and merge it with master
# This will create a merge commit message, which we don't care about.
# It gets lost in a squash later.
git checkout -b release
git merge remotes/origin/master
# Push the release branch to gitlab
git push -u origin release
Create a pull request from the release
branch targeting the master
branch (base: master, compare: release).
Merge using squash and merge.
Wait for the unit tests and smoketests to pass before merging.
Once the pull request has finished, make sure to delete the release
branch.
Once the pull request has been merged, add a new version tag:
# Fetch the updated master branch
git fetch origin
git checkout remotes/origin/master
# Add and push the version tag
git tag -a vX.X.X -m "<some message about the version>"
git push origin --tag
Pushing a tag triggers a branch of automation in travis-ci which will build the binaries and attach them to the release.
The secure API token used in .travis.yml
for automating releases is a travis-encoded personal access token for the carbon-bot-user
GitHub user.
Add release notes to the release with this format.
### Features
* Features here.
###Fixes
* Bug fixes here.
This can be done through the Github UI by clicking the edit button on the latest release. Please follow the existing formatting when adding release notes.
This should have been done all through development, but in particular here, we must create the links for the newly-tagged release. Documentation lives in the layer0-docs repository. Follow the instructions in that repo's README for updating for a new Layer0 release.
Once the release is available for download, send a message to #carbon with a link and a one-line summary of the release contents. For example:
@here Layer0 has released v0.9.0 https://github.com/quintilesims/layer0/releases - which aims to be a stable version of our load balancer support.
To bring the develop
branch up-to-date with master
, create a create a pull request from the master
branch targeting the develop
branch (base: develop, compare: master). Please rebase and merge (squash and merge if not possible.)