Skip to content

Latest commit

 

History

History
116 lines (72 loc) · 5.42 KB

release-workflow.md

File metadata and controls

116 lines (72 loc) · 5.42 KB

KBase Release Workflow

Contents


Prerequisites

The KBase Release workflow requires the following:

  1. The develop branch must contain all code that is to be released.
  2. The pr_build.yml and release-main.yml workflows described in the New Repository and Existing Repository sections must be present in the repo.
  3. The branch rules discussed in Enable Branch Rules must be enabled.

Summary

  • To start the production release process, a pull request from develop to main or master is created.
  • On pull request creation, an image is built with a tag that matches the pull request (e.g. {REPONAME}:pr-42)
  • The developer repsonsible for releases merges the pull request, which tags the image as {REPONAME}:latest-rc
  • A production release is created using the GitHub Create a release process.
  • A final production image is tagged as {REPONAME}:x.x.x and {REPONAME}:latest

Process Details

Before proceeding, please confirm that all prerequisites above are met.

1. Create a Pull Request

To start the release process, create a pull request from the develop branch to the main or master branch.

See the Development Workflow for general steps, making sure to create a pull request from develop to main or master.

2. Test Image

When a pull request to main or master is created or updated, the pr_build.yml workflow will automatically start building a test image. To utilize this image for testing in non-prod environments:

Expand For Instructions
  1. Allow the pull_request job in the Pull Request Build, Tag, & Push workflow to complete.
    • The status of of the build will be visible in the Checks section of the pull request
    • The status can also be viewed from the Actions tab.
  2. Once the build completes successfully, click the Code tab in the repo.
  3. Navigate to the Packages section on the right of the screen, and click {REPONAME}.
  4. In the packages view, confirm that an image matching the pull request number exists (e.g. {REPONAME}:pr-42).
  5. Test this image, and optionally deploy to a pre-production environment, such as next.
⚠️ Where's The Image?
If the {REPONAME} image doesn't appear under the Code tab under Packages, ask a KBase administrator to make the image public & link the package to the repo.

3. Merge Pull Request

Once all builds pass, and the images have been tested in a pre-production enviroment, request a pull request review from another developer with access to the repo in question.

Merge Pull Request Demo
Expand For Demo

This demo shows a pull request from a feature branch to develop, but the process is the same for a pull request from develop to main or master.

MergePR

Automatic Image Tagging

After the pull request is merged, the Pull Request Build, Tag, & Push workflow will trigger the tag_on_merge job, which automatically tags the image created above as latest-rc. This image is now ready to be deployed to next or other pre-production environments.

4. Create Release

  1. Once the code in the repo's main or master branch is ready to be deployed to production, use the GitHub Creating a Release process to build a new semantic release.
  2. Make sure the release is using Target: main or master.
  3. Enter a new tag that uses semantic versioning.
  4. Once released, a new image will be deployed as {APPNAME} with both the semantic version and latest as tags.
Create Release Demo
Expand For Demo

This demo shows a pull request from a feature branch to develop, but the process is the same for a pull request from develop to main or master.

ReleaseWorkflow


|| Previous: Development Workflow || Home ||