-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restructured repo to typical spsh rollout process
- Loading branch information
M_Westerholz
committed
Oct 11, 2024
1 parent
9edd39f
commit 95566d7
Showing
11 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
name: Install and Run SPSH loadtest Action | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
instance_name: | ||
type: string | ||
required: true | ||
instance_stage: | ||
type: string | ||
required: true | ||
frontend_hostname: | ||
type: string | ||
required: true | ||
release_tag: | ||
type: string | ||
required: true | ||
dbseeding: | ||
required: false | ||
description: "Enable Seeding (true, false, chart_value)" | ||
default: chart_value | ||
type: string | ||
secrets: | ||
TOKEN: | ||
required: true | ||
KUBECONFIG: | ||
required: true | ||
RC_WEBHOOK: | ||
required: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: spsh-k6-loadtest-rollout-run | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
rollout: | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | ||
with: | ||
repository: 'dBildungsplattform/schulportal-load-tests' | ||
# change this ref to a branch to test changes | ||
ref: "${{ inputs.release_tag }}" | ||
# ref: "<branch_name>" | ||
|
||
- name: Install kubectl and Helm | ||
uses: azure/setup-kubectl@3e0aec4d80787158d308d7b364cb1b702e7feb7f #v4.0.0 | ||
|
||
- name: Set kubeconfig | ||
run: | | ||
mkdir /home/runner/.kube/ | ||
echo "${{ secrets.KUBECONFIG }}" > /home/runner/.kube/config | ||
chmod 600 /home/runner/.kube/config | ||
- name: Helm add repo dbilungsplattform | ||
run: | | ||
helm repo add dbildungsplattform https://dbildungsplattform.github.io/helm-charts-registry/ | ||
- name: Rollout spsh-k6-loadtest Helm Chart | ||
run: | | ||
helm upgrade --install \ | ||
spsh-k6-loadtest \ | ||
./charts/schulportal-load-tests \ | ||
--namespace spsh \ | ||
--kubeconfig /home/runner/.kube/config \ | ||
--wait |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: 'Publish image to GHCR and Helm chart to GH pages on tag' | ||
|
||
on: | ||
push: | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
|
||
concurrency: | ||
group: spsh-loadtest-main | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
publish_docker: | ||
permissions: | ||
packages: write | ||
security-events: write | ||
contents: read | ||
uses: dBildungsplattform/dbp-github-workflows/.github/workflows/[email protected] | ||
with: | ||
image_name: "spsh-k6-loadtest" | ||
run_trivy_scan: true | ||
image_tag_generation: "version_git_tag" | ||
add_latest_tag: true | ||
container_registry: "ghcr.io" | ||
publish_helm: | ||
uses: dBildungsplattform/dbp-github-workflows/.github/workflows/[email protected] | ||
secrets: inherit | ||
with: | ||
chart_name: spsh-k6-loadtest | ||
helm_chart_version_generation: specified | ||
image_tag_generation: specified | ||
helm_chart_version: ${{ github.ref_name }} | ||
image_tag: ${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: 'Publish image to GHCR on push to branch' | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'main' | ||
|
||
concurrency: | ||
group: spsh-loadtest-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build_and_push: | ||
permissions: | ||
packages: write | ||
security-events: write | ||
contents: read | ||
uses: dBildungsplattform/dbp-github-workflows/.github/workflows/[email protected] | ||
with: | ||
image_name: "spsh-k6-loadtest" | ||
run_trivy_scan: true | ||
image_tag_generation: "ticket_from_branch" | ||
add_latest_tag: false | ||
container_registry: "ghcr.io" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: "Scan Helm on push" | ||
|
||
on: | ||
push: | ||
|
||
concurrency: | ||
group: spsh-loadtest-scan-helm-${{ github.event.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
scan_helm: | ||
uses: dBildungsplattform/dbp-github-workflows/.github/workflows/[email protected] | ||
permissions: | ||
contents: read |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.