Fix Makefile #613
Workflow file for this run
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
name: end-2-end Helm Chart Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
e2e: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# https://hub.docker.com/r/kindest/node/tags | |
k8s_version: [ "v1.28.13", "v1.29.8", "v1.30.4" ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install kind with registry | |
uses: bakito/kind-with-registry-action@main | |
with: | |
ingress_enabled: true | |
node_image: kindest/node:${{ matrix.k8s_version }} | |
kubectl_version: ${{ matrix.k8s_version }} | |
- name: Build image | |
run: ./testdata/e2e/buildImage.sh | |
- name: Install sealed-secrets | |
run: | | |
helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets | |
helm install sealed-secrets sealed-secrets/sealed-secrets \ | |
--namespace sealed-secrets \ | |
--create-namespace \ | |
--atomic | |
- name: Install sealed-secrets-web with yaml format In-Cluster | |
run: ./testdata/e2e/installSealedSecretsWebChart.sh yaml "" | |
- name: π Install sealed-secrets-web with json format In-Cluster | |
run: | | |
helm delete sealed-secrets-web --namespace sealed-secrets-web | |
./testdata/e2e/installSealedSecretsWebChart.sh json "" | |
- name: π Run Tests In-Cluster | |
id: run_tests_in_cluster | |
# continue on error to show logs | |
continue-on-error: true | |
working-directory: testdata/e2e | |
run: ./runTests.sh | |
- name: π Print logs In-Cluster | |
run: | | |
echo 'π Pod logs (json format In-Cluster)' >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
POD_NAME=$(kubectl get pod -n sealed-secrets-web -l app.kubernetes.io/instance=sealed-secrets-web -o name) | |
kubectl logs -n sealed-secrets-web ${POD_NAME} >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
- name: π Fail if 'Run Tests In-Cluster' failed | |
if: steps.run_tests_in_cluster.outcome=='failure' | |
run: | | |
echo "Step 'Run Tests In-Cluster' failed: Check 'Run Tests In-Cluster' and 'Print logs In-Cluster' as well as the job summary for errors" | |
exit 1 | |
- name: π Install sealed-secrets-web with json format and cert URL | |
run: | | |
helm delete sealed-secrets-web --namespace sealed-secrets-web | |
./testdata/e2e/installSealedSecretsWebChart.sh json http://sealed-secrets.sealed-secrets.svc:8080/v1/cert.pem | |
- name: π Run Tests Cert-URL | |
id: run_tests_certURL | |
# continue on error to show logs | |
continue-on-error: true | |
working-directory: testdata/e2e | |
run: ./runTests.sh skip-validate | |
- name: π Print logs Cert-URL | |
run: | | |
echo 'π Pod logs (json format and Cert-URL)' >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
POD_NAME=$(kubectl get pod -n sealed-secrets-web -l app.kubernetes.io/instance=sealed-secrets-web -o name) | |
kubectl logs -n sealed-secrets-web ${POD_NAME} >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
- name: π Fail if 'Run Tests Cert-URL' failed | |
if: steps.run_tests_certURL.outcome=='failure' | |
run: | | |
echo "Step 'Run Tests Cert-URL' failed: Check 'Run Tests Cert-URL' and 'Print logsCert-URL' as well as the job summary for errors" | |
exit 1 |