Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: document ci #54

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
# Release branches where trunk branches are merge-committed to trigger releases

release:
- base-branch:
- 'release/.+'
- 'maintenance/.+/[0-9]+\.([0-9]+|x)\.x'
- 'maintenance/.+/release/[0-9]+\.([0-9]+|x)\.x'

# Trunk branches where changes are collected before assets are released

trunk:
- base-branch:
- 'main'
- 'maintenance/.+/trunk/[0-9]+\.([0-9]+|x)\.x'

# Label any maintenance branch, trunk and release

maintenance:
- base-branch:
- 'maintenance/.+/.+'
- 'maintenance/.+/.+/[0-9]+\.([0-9]+|x)\.x'

# Label PRs into the main branch

main:
- base-branch:
- 'main'

# Labels for PRs on asset specific branches

controller-container:
- base-branch:
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/controller-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@ name: Controller Container

on:
pull_request:
# Ignore PRs on branches specifically intended for other assets
branches-ignore:
- '*/fizzbuzz-chart*'
- '*/fizzbuzz-crds-chart*'
# Only consider PRs that change files for this asset, including ci scripts
paths:
- '.github/workflows/flake8.yaml'
- '.github/workflows/controller-container.yaml'
- 'containers/controller/**'
# Make sure all workflows that are "required checks" for a given
# branch protection rule have the same paths: and branches-ignore:
# filters. Otherwise, you can end up in a deadlock waiting on a
# required check that will never be executed.
push:
# Only release off of release and maintenance branches for this asset
branches:
- 'maintenance/controller-container/[0-9]+.x.x'
- 'maintenance/controller-container/[0-9]+.[0-9]+.x'
- 'maintenance/controller-container/release/[0-9]+.x.x'
- 'maintenance/controller-container/release/[0-9]+.[0-9]+.x'
- 'release/controller-container'
# Only consider pushes that change files for this asset, including ci scripts
paths:
- '.github/workflows/controller-container.yaml'
- 'containers/controller/**'
Expand All @@ -25,10 +33,11 @@ permissions:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Needed to generate releases safely
cancel-in-progress: false

jobs:
controller-container:
build:
uses: SwanseaUniversityMedical/workflows/.github/workflows/pr-and-release-container.yaml@feat/build-cache
with:
job-name: controller-container
Expand All @@ -38,8 +47,7 @@ jobs:
release-tag-format: 'controller-container-${version}'
release-branches: |
[
'maintenance/controller-container/[0-9]+\.x\.x',
'maintenance/controller-container/[0-9]+\.[0-9]+\.x',
'maintenance/controller-container/[0-9]+\.([0-9]+|x)\.x',
'release/controller-container'
]
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/fizzbuzz-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@ name: Fizzbuzz Chart

on:
pull_request:
# Ignore PRs on branches specifically intended for other assets
branches-ignore:
- '*/controller-container*'
- '*/fizzbuzz-crds-chart*'
# Only consider PRs that change files for this asset, including ci scripts
paths:
- '.github/workflows/fizzbuzz-chart.yaml'
- 'charts/fizzbuzz/**'
# Make sure all workflows that are "required checks" for a given
# branch protection rule have the same paths: and branches-ignore:
# filters. Otherwise, you can end up in a deadlock waiting on a
# required check that will never be executed.
push:
# Only release off of release and maintenance branches for this asset
branches:
- 'maintenance/fizzbuzz-chart/[0-9]+.x.x'
- 'maintenance/fizzbuzz-chart/[0-9]+.[0-9]+.x'
- 'release/fizzbuzz-chart'
# Only consider pushes that change files for this asset, including ci scripts
paths:
- '.github/workflows/fizzbuzz-chart.yaml'
- 'charts/fizzbuzz/**'
Expand All @@ -24,10 +32,11 @@ permissions:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Needed to generate releases safely
cancel-in-progress: false

jobs:
fizzbuzz-chart:
build:
uses: SwanseaUniversityMedical/workflows/.github/workflows/[email protected]
with:
job-name: fizzbuzz-chart
Expand All @@ -38,8 +47,7 @@ jobs:
release-tag-format: 'fizzbuzz-chart-${version}'
release-branches: |
[
'maintenance/fizzbuzz-chart/[0-9]+\.x\.x',
'maintenance/fizzbuzz-chart/[0-9]+\.[0-9]+\.x',
'maintenance/fizzbuzz-chart/[0-9]+\.([0-9]+|x)\.x',
'release/fizzbuzz-chart'
]
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/fizzbuzz-crds-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@ name: Fizzbuzz CRDs Chart

on:
pull_request:
# Ignore PRs on branches specifically intended for other assets
branches-ignore:
- '*/controller-container*'
- '*/fizzbuzz-chart*'
# Only consider PRs that change files for this asset, including ci scripts
paths:
- '.github/workflows/fizzbuzz-crds-chart.yaml'
- 'charts/fizzbuzz-crds/**'

# Make sure all workflows that are "required checks" for a given
# branch protection rule have the same paths: and branches-ignore:
# filters. Otherwise, you can end up in a deadlock waiting on a
# required check that will never be executed.
push:
# Only release off of release and maintenance branches for this asset
branches:
- 'maintenance/fizzbuzz-crds-chart/[0-9]+.x.x'
- 'maintenance/fizzbuzz-crds-chart/[0-9]+.[0-9]+.x'
- 'release/fizzbuzz-crds-chart'
# Only consider pushes that change files for this asset, including ci scripts
paths:
- '.github/workflows/fizzbuzz-crds-chart.yaml'
- 'charts/fizzbuzz-crds/**'
Expand All @@ -25,10 +32,11 @@ permissions:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Needed to generate releases safely
cancel-in-progress: false

jobs:
fizzbuzz-crds-chart:
build:
uses: SwanseaUniversityMedical/workflows/.github/workflows/[email protected]
with:
job-name: fizzbuzz-crds-chart
Expand All @@ -39,8 +47,7 @@ jobs:
release-tag-format: 'fizzbuzz-crds-chart-${version}'
release-branches: |
[
'maintenance/fizzbuzz-crds-chart/[0-9]+\.x\.x',
'maintenance/fizzbuzz-crds-chart/[0-9]+\.[0-9]+\.x',
'maintenance/fizzbuzz-crds-chart/release/[0-9]+\.([0-9]+|x)\.x',
'release/fizzbuzz-crds-chart'
]
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/flake8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,27 @@ name: Flake8

on:
pull_request:
# Ignore PRs on branches specifically intended for other assets
branches-ignore:
- '*/fizzbuzz-chart*'
- '*/fizzbuzz-crds-chart*'
# Only consider PRs that change files for this asset, including ci scripts
paths:
- '.github/workflows/flake8.yaml'
- '.github/workflows/controller-container.yaml'
- 'containers/controller/**'
# Make sure all workflows that are "required checks" for a given
# branch protection rule have the same paths: and branches-ignore:
# filters. Otherwise, you can end up in a deadlock waiting on a
# required check that will never be executed.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# This linting can be cancelled if there is a newer commit to lint
cancel-in-progress: true

jobs:
flake8:
lint:
runs-on:
labels: [self-hosted, linux, x64]
group: light
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- reopened

jobs:
label:
labeler:
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
Loading