Contents
The KBase Release workflow requires the following:
- The
develop
branch must contain all code that is to be released.- See the Development Workflow for more
- The
pr_build.yml
andrelease-main.yml
workflows described in the New Repository and Existing Repository sections must be present in the repo. - The branch rules discussed in Enable Branch Rules must be enabled.
- To start the production release process, a pull request from
develop
tomain
ormaster
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
Before proceeding, please confirm that all prerequisites above are met.
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
.
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
- Allow the
pull_request
job in thePull 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.
- The status of of the build will be visible in the
- Once the build completes successfully, click the
Code
tab in the repo. - Navigate to the
Packages
section on the right of the screen, and click{REPONAME}
. - In the packages view, confirm that an image matching the pull request number exists (e.g.
{REPONAME}:pr-42
). - Test this image, and optionally deploy to a pre-production environment, such as
next
.
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. |
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.
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
.
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.
- Once the code in the repo's
main
ormaster
branch is ready to be deployed to production, use the GitHub Creating a Release process to build a new semantic release. - Make sure the release is using
Target:
main
ormaster
. - Enter a new tag that uses semantic versioning.
- Once released, a new image will be deployed as
{APPNAME}
with both the semantic version andlatest
as tags.
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
.
|| Previous: Development Workflow || Home ||