Skip to content

Fix Makefile

Fix Makefile #614

Workflow file for this run

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