Skip to content

Production deployment

Launch Window

Most of our GitLab pipelines are configured to require the creation of a Git tag to make a deployment to production.

To deploy the main branch to production, first create an annotated version tag as follows:

# Switch to the main branch and ensure it's up-to-date.
git checkout main
git pull

# Get an ordered list of the last few tags; see last version.
git tag --sort=creatordate --format="%(refname:short) %(*subject) (%(*authorname))" | tail

# Create an annotated version tag (see below for choosing a version).
git tag -a v0.0.1 -m "Version 0.0.1"

# Push the new version tag to remote.
git push origin v0.0.1

When creating a new version tag, increment the version as per Semantic Versioning (https://semver.org/).

Once the new version tag is pushed, you can go to GitLab to find the deploy pipeline for that version. Starting that pipeline will deploy that version to production.

header image credit: xkcd