Skip to content

Commit

Permalink
test: trigger bulk chart and single container (#203)
Browse files Browse the repository at this point in the history
* test: trigger single container ci

* feat: add bulk chart test workflow
  • Loading branch information
rdash99 authored Jan 30, 2025
1 parent 3178214 commit 556a6b0
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 1 deletion.
70 changes: 70 additions & 0 deletions .github/workflows/fizzbuzz-crds-chart-bulk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build Fizzbuzz CRDs Chart

on:
pull_request:
# Ignore PRs on branches specifically intended for other assets
branches-ignore:
- '*/controller-container*'
- '*/trino-container*'
- '*/fizzbuzz-chart*'
# Only consider PRs that change files for this asset, including ci scripts
paths:
- '.github/workflows/fizzbuzz-crds-chart-bulk.yaml'
- 'charts/fizzbuzz-crds-bulk/**'
# 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-bulk/[0-9]+.x.x'
- 'maintenance/fizzbuzz-crds-chart-bulk/[0-9]+.[0-9]+.x'
- 'main'
# Only consider pushes that change files for this asset, including ci scripts
paths:
- '.github/workflows/fizzbuzz-crds-chart-bulk.yaml'
- 'charts/fizzbuzz-crds-bulk/**'

permissions:
contents: write
pull-requests: write
actions: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Cancel early on pull requests if new commits are added,
# Don't cancel on release pushes
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
# Job name must be unique across repo to target
# branch protection rules "required checks" properly!

bulk-fizzbuzz-test:
uses: SwanseaUniversityMedical/workflows/.github/workflows/pr-and-release-repo.yaml@v1.0.0-repo
with:
job-name: bulk-fizzbuzz-test
release-tag-format: 'v${version}-bulk-fizzbuzz-test'

fizzbuzz-crds-chart-bulk:
needs: bulk-fizzbuzz-test
uses: SwanseaUniversityMedical/workflows/.github/workflows/bulk-pr-and-release-chart.yaml@v1.0.1-bulk-charts
with:
job-name: fizzbuzz-crds-chart
comment-pr: "true"
comment-release: "true"
registry: ${{ vars.HARBOR_REGISTRY }}
registry-user: ${{ vars.HARBOR_USER }}
registry-project: ${{ vars.HARBOR_PROJECT }}
registry-repo: fizzbuzz-crds
release-info: ${{ needs.bulk-fizzbuzz-test.outputs.release-info }}
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
chart: charts/fizzbuzz-crds
test-command: |
helm template $CHART --debug
secrets:
cosign-private-key: ${{ secrets.COSIGN_PRIVATE_KEY }}
cosign-password: ${{ secrets.COSIGN_PASSWORD }}
registry-token: ${{ secrets.HARBOR_TOKEN }}
24 changes: 24 additions & 0 deletions charts/fizzbuzz-crds-bulk/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line..
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
6 changes: 6 additions & 0 deletions charts/fizzbuzz-crds-bulk/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
appVersion: 0.0.0
description: Fizzbuzz CRDs.
name: fizzbuzz-crds
type: application
version: 0.0.0
26 changes: 26 additions & 0 deletions charts/fizzbuzz-crds-bulk/crds/fizzbuzz.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
# name must match the spec fields below, and be in the form: <plural>.<group>
name: fizzbuzzs.fizzbuzz.ukserp.ac.uk
spec:
group: fizzbuzz.ukserp.ac.uk
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
n:
type: integer
description: Fizzbuzz input N.
scope: Namespaced
names:
plural: fizzbuzzs
singular: fizzbuzz
kind: Fizzbuzz
1 change: 1 addition & 0 deletions charts/fizzbuzz-crds-bulk/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# test
2 changes: 1 addition & 1 deletion containers/internal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM harbor.ukserp.ac.uk/github-workflows-test/controller:7.1.0
FROM harbor.ukserp.ac.uk/github-workflows-test/controller:7.1.0

0 comments on commit 556a6b0

Please sign in to comment.