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

Add keb chart validation to release #227

Merged
merged 2 commits into from
Nov 29, 2023
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
13 changes: 12 additions & 1 deletion .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
type: boolean
description: 'Create PR with sec-scanners-config bump'
default: true
k3s-versions:
type: number
description: 'Number of last k3s versions to be used for tests'

jobs:
validate-release:
Expand Down Expand Up @@ -109,6 +112,14 @@ jobs:
needs: validate-release
uses: "./.github/workflows/run-unit-tests-reusable.yaml"

run-keb-chart-tests:
name: Validate KEB chart
needs: validate-release
uses: "./.github/workflows/run-keb-chart-tests-reusable.yaml"
secrets: inherit
with:
last-k3s-versions: ${{ github.event.inputs.k3s-versions || vars.LAST_K3S_VERSIONS }}

create-draft:
name: Create draft release
needs: [bump-sec-scanners-config,validate-release]
Expand Down Expand Up @@ -236,7 +247,7 @@ jobs:

publish-release:
name: Publish release
needs: [create-draft, wait-for-prow-jobs, run-unit-tests]
needs: [create-draft, wait-for-prow-jobs, run-unit-tests, run-keb-chart-tests]
runs-on: ubuntu-latest

steps:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/run-keb-chart-tests-reusable.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate and deploy keb helm chart (reusable)
name: Validate KEB chart (reusable)

on:
workflow_call:
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Validate keb helm chart
- name: Validate KEB helm chart
run: |
cd resources/keb
helm template .
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
helm repo add istio https://istio-release.storage.googleapis.com/charts
helm install istio-base istio/base -n istio-system --set defaultRevision=default

- name: Deploy keb helm chart
- name: Deploy KEB helm chart
run: |
cd resources/keb
helm template . | kubectl apply -f -
Expand All @@ -80,7 +80,7 @@ jobs:
outputs:
success: ${{ steps.set-output.outputs.success }}
steps:
- name: Confirm keb chart tests result
- name: Confirm KEB chart tests result
id: set-output
run: echo "success=true" >> "${GITHUB_OUTPUT}"

Expand All @@ -89,10 +89,10 @@ jobs:
if: always()
needs: confirm-keb-chart-tests-result
steps:
- name: Check keb chart tests result
- name: Check KEB chart tests result
run: |
if [ "${{ needs.confirm-keb-chart-tests-result.outputs.success }}" != "true" ]; then
echo "keb chart tests failed"
echo "KEB chart tests failed"
exit 1
fi
echo "keb chart tests passed"
echo "KEB chart tests passed"
2 changes: 1 addition & 1 deletion .github/workflows/run-keb-chart-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate and deploy keb helm chart
name: Validate KEB chart

on:
pull_request:
Expand Down
Loading