Skip to content

Commit

Permalink
Merge torrust#412: More Release Preparation
Browse files Browse the repository at this point in the history
7365423 ci: use coverage environment (Cameron Garnham)
d9a506a docs: draft release process document (Cameron Garnham)
d09fa65 dev: fixup container workfows bug (Cameron Garnham)

Pull request description:

ACKs for top commit:
  da2ce7:
    ACK 7365423

Tree-SHA512: 33fd00c290b83d8271f720245def67d9e8c292029267873449c54a5266f3a3b14d192f9d008ac71f423ff98f4c3cf3dc9d15e10c8a18d89f2678d022c367b554
  • Loading branch information
da2ce7 committed Sep 11, 2023
2 parents 739066d + 7365423 commit af712a2
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:

steps:
- id: meta_development
if: needs.secrets.check.type == 'development'
if: needs.context.check.type == 'development'
name: Docker Meta (development)
uses: docker/metadata-action@v4
with:
Expand All @@ -128,17 +128,17 @@ jobs:
type=ref,event=branch
- id: meta_release
if: needs.secrets.check.type == 'release'
if: needs.context.check.type == 'release'
name: Docker Meta (release)
uses: docker/metadata-action@v4
with:
images: |
"${{ secrets.DOCKER_HUB_USERNAME }}/${{secrets.DOCKER_HUB_REPOSITORY_NAME }}"
tags: |
type=semver,value=${{ needs.secrets.check.version }},pattern={{raw}}
type=semver,value=${{ needs.secrets.check.version }},pattern={{version}}
type=semver,value=${{ needs.secrets.check.version }},pattern=v{{major}}
type=semver,value=${{ needs.secrets.check.version }},pattern={{major}}.{{minor}}
type=semver,value=${{ needs.context.check.version }},pattern={{raw}}
type=semver,value=${{ needs.context.check.version }},pattern={{version}}
type=semver,value=${{ needs.context.check.version }},pattern=v{{major}}
type=semver,value=${{ needs.context.check.version }},pattern={{major}}.{{minor}}
- id: login
name: Login to Docker Hub
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,27 @@ env:
CARGO_TERM_COLOR: always

jobs:
secrets:
name: Secrets
environment: coverage
runs-on: ubuntu-latest

outputs:
continue: ${{ steps.check.outputs.continue }}

steps:
- id: check
name: Check
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
if: "${{ env.CODECOV_TOKEN != '' }}"
run: echo "continue=true" >> $GITHUB_OUTPUT

report:
name: Report
environment: coverage
needs: secrets
if: needs.secrets.outputs.continue == 'true'
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: "0"
Expand Down
61 changes: 61 additions & 0 deletions docs/release_process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Torrust Tracker Release Process (draft)

The purpose of this document is to describe the release process.

## Overview

Torrust Tracker is published in this order:

1. `develop` branch is ready for publishing.
2. create `release: version (semantic version)` commit.
3. push release commit to `main` branch.
4. check all status checks succeed for `main` branch.
5. push `main` branch to `releases\v(semantic version)` branch.
6. check all status checks success for `releases\v(semantic version)` branch.
7. create signed `v(semantic version)` tag.
8. create github release from `v(semantic version)` tag.
9. merge `main` branch into `develop` branch.

- At step `1.`, `develop` is automatically published to `dockerhub`.
- At step `3.`, `main` is automatically published to `dockerhub`.
- At step `5.`, `releases\v(semantic version)` is automatically published to `dockerhub` and `crate.io`.

## Development Branch

The `develop` branch, the default branch for the repository is automatically published to dockerhub with the `develop` label. This process happens automatically when a pull request is merged in, and the `container.yaml` workflow is triggered.

## Main Branch

The `main` branch is the staging branch for releases.

A release commit needs to be made that prepares the repository for the release, this commit should include:

- Changing the semantic version.
- Finalizing the release notes and changelog.

The title of the commit should be: `release: version (semantic version)`.

This commit should be committed upon the head of the development branch, and pushed to the `main` branch.

Once the release has succeeded, the `main` branch should be merged back into the `develop` branch.

## Releases Branch

According to the patten `releases/v(semantic version)`, the `main` branch head is published to here to trigger the deployment workflows.

The repository deployment environment for crates.io is only available for the `releases/**/*` patten of branches.

Once the publishing workflows have succeeded; we can make the git-tag.

## Release Tag

Create a Signed Tag with a short message in the form `v(semantic version)` and push it to the repository.

## Github Release

From the newly published tag, create a Github Release using the web-interface.


## Merge back into development branch

After this is all successful, the `main` branch should be merged into the `develop` branch.

0 comments on commit af712a2

Please sign in to comment.