Skip to content

Commit

Permalink
show the whole e2e pod log and make run_local.sh rerunnable (#148)
Browse files Browse the repository at this point in the history
* show the whole e2e pod log

* make run_local.sh idempotent
  • Loading branch information
bakito committed May 13, 2023
1 parent 96df8d9 commit 8f437e3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 19 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ jobs:
run: |
echo '🏠 Pod logs (json format In-Cluster)' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
kubectl logs -n sealed-secrets-web -l app.kubernetes.io/instance=sealed-secrets-web >> $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
Expand All @@ -68,13 +69,14 @@ jobs:
# continue on error to show logs
continue-on-error: true
working-directory: testdata/e2e
run: ./runTests.sh "skip-validate"
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
kubectl logs -n sealed-secrets-web -l app.kubernetes.io/instance=sealed-secrets-web >> $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
Expand Down
14 changes: 6 additions & 8 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
apiVersion: v2
appVersion: v3.0.8
appVersion: v3.1.1
description: A web interface for Sealed Secrets by Bitnami.
home: https://github.com/bakito/sealed-secrets-web
icon: https://raw.githubusercontent.com/bakito/sealed-secrets-web/master/assets/logo.png
maintainers:
- name: bakito
url: https://github.com/bakito
name: sealed-secrets-web
version: 3.0.8
annotations:
artifacthub.io/changes: |
- kind: added
description: Add ServiceAccount automountServiceAccountToken
- kind: added
description: Add Secret Validation
version: 3.1.1
#annotations:
# artifacthub.io/changes: |
# - kind: added
# description: ...
2 changes: 1 addition & 1 deletion chart/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# sealed-secrets-web

![Version: 3.0.8](https://img.shields.io/badge/Version-3.0.8-informational?style=flat-square) ![AppVersion: v3.0.8](https://img.shields.io/badge/AppVersion-v3.0.8-informational?style=flat-square)
![Version: 3.1.1](https://img.shields.io/badge/Version-3.1.1-informational?style=flat-square) ![AppVersion: v3.1.1](https://img.shields.io/badge/AppVersion-v3.1.1-informational?style=flat-square)

A web interface for Sealed Secrets by Bitnami.

Expand Down
14 changes: 8 additions & 6 deletions run_local.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#!/bin/sh
#!/bin/bash

set -eo pipefail

# install registry
docker run -d --restart=always -p "127.0.0.1:5001:5000" --name kind-registry registry:2
docker start kind-registry || docker run -d --restart=always -p "127.0.0.1:5001:5000" --name kind-registry registry:2

# startup kind
curl -L https://raw.githubusercontent.com/bakito/kind-with-registry-action/main/kind-config.yaml -o testdata/e2e/kind-config.yaml
kind create cluster --config=testdata/e2e/kind-config.yaml
if $(kind get clusters | grep -vqFx kind); then
curl -L https://raw.githubusercontent.com/bakito/kind-with-registry-action/main/kind-config.yaml -o testdata/e2e/kind-config.yaml
kind create cluster --name kind --config=testdata/e2e/kind-config.yaml
fi

# setup registry
docker network connect kind kind-registry
docker network connect kind kind-registry || true
kubectl apply -f https://raw.githubusercontent.com/bakito/kind-with-registry-action/main/configmap-registry.yaml

# setup ingress
Expand All @@ -25,7 +27,7 @@ kubectl wait --namespace ingress-nginx \

# install sealed secrets
helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets
helm install sealed-secrets sealed-secrets/sealed-secrets \
helm upgrade --install sealed-secrets sealed-secrets/sealed-secrets \
--namespace sealed-secrets \
--create-namespace \
--atomic
Expand Down
4 changes: 3 additions & 1 deletion testdata/e2e/runTests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash
set -e

if [ "${1}" != "skip-validate" ]; then
if [ "${1}" != "skip-validate" ]; then
./runTestValidate.sh
else
echo "Validation test is skipped"
fi

./runTestKubeseal.sh
Expand Down

0 comments on commit 8f437e3

Please sign in to comment.