Install unreleased Helm chart #13638
Workflow file for this run
This file contains hidden or 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-to-end test | |
| on: | |
| push: | |
| schedule: | |
| - cron: '0 4,16 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| test-last-release: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| release-name: [betterstack-logs, my-logs, my-vector, vector] | |
| namespace-arg: ["", "--namespace monitoring"] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Install Helm | |
| uses: azure/setup-helm@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Minikube | |
| uses: medyagh/setup-minikube@master | |
| - name: Check cluster pods | |
| run: kubectl get pods -A | |
| - name: Create extra namespace | |
| run: kubectl create namespace monitoring | |
| - name: Install unreleased Helm chart | |
| run: | | |
| helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/ | |
| helm repo add vector https://helm.vector.dev | |
| helm repo update | |
| helm dependency build . | |
| sed 's/$SOURCE_TOKEN/${{ secrets.HELM_E2E_TEST_SOURCE_TOKEN }}/g' .github/helm-values-template.yaml > my-values.yaml | |
| helm dependency update && helm dependency build . && helm install ${{ matrix.release-name }} . -f my-values.yaml ${{ matrix.namespace-arg }} | |
| - name: List the used Helm release version | |
| run: helm list -A | |
| - name: Wait for the chart to be ready | |
| run: kubectl wait --for=condition=available deployment/${{ matrix.release-name }}-metrics-server --timeout=60s ${{ matrix.namespace-arg }} | |
| - name: Check cluster pods | |
| run: kubectl get pods -A | |
| - name: Deploy Hello World pod | |
| run: kubectl run hello-world --image=hello-world --wait | |
| - name: Check cluster pods | |
| run: kubectl get pods -A | |
| - name: Wait for a while with the running pods | |
| run: sleep 60 | |
| - name: Check cluster pods | |
| run: kubectl get pods -A | |
| - name: Show logs from Vector pod for debugging | |
| run: kubectl logs -l app.kubernetes.io/name=vector ${{ matrix.namespace-arg }} | |
| - name: See latest events | |
| if: always() | |
| run: kubectl get events -A --sort-by=.lastTimestamp | tail -30 | |
| - name: Check if all pods are running | |
| run: kubectl get pods -A -o jsonpath='{range .items[*]}{.status.phase}{"\n"}{end}' | grep -qv "^Running$" && echo "Not all pods are running" && exit 1 || echo "OK" |