Skip to content

Commit

Permalink
ci(.github): add marketplace-smoke-test.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Vaughn Dice <[email protected]>
  • Loading branch information
vdice committed Sep 12, 2024
1 parent b3fa8a0 commit b84879c
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/marketplace-smoke-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Marketplace Smoketest

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
helm-install-smoke-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Install helm
uses: Azure/setup-helm@v4
with:
version: v3.15.4

- name: create kind cluster
uses: helm/kind-action@v1

- name: helm install spinkube
run: |
helm install spinkube \
--wait \
--namespace spinkube \
--create-namespace \
--debug \
marketplace/charts/spinkube-azure-marketplace
- name: run spin app
run: |
kubectl apply -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/samples/simple.yaml
kubectl rollout status deployment simple-spinapp --timeout 90s
kubectl get pods -A
kubectl port-forward svc/simple-spinapp 8083:80 &
timeout 15s bash -c 'until curl -f -vvv http://localhost:8083/hello; do sleep 2; done'
- name: debug
if: failure()
run: |
kubectl get pods -A
kubectl get certificate -n spinkube
kubectl logs -n spinkube -l app.kubernetes.io/name=spin-operator || true
kubectl describe -n spinkube pod -l app.kubernetes.io/name=spin-operator || true
kubectl logs -n spinkube -l app.kubernetes.io/name=kwasm-operator || true
kubectl describe -n spinkube pod -l app.kubernetes.io/name=kwasm-operator || true
kubectl logs -l core.spinoperator.dev/app-name=simple-spinapp || true
kubectl describe pod -l core.spinoperator.dev/app-name=simple-spinapp || true
- name: Verify curl
run: curl localhost:8083/hello

0 comments on commit b84879c

Please sign in to comment.