Skip to content

Commit

Permalink
fix: e2e workflow adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Fovty committed Apr 15, 2024
1 parent 92c73e9 commit 601868e
Showing 1 changed file with 37 additions and 48 deletions.
85 changes: 37 additions & 48 deletions .github/workflows/end2end.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# This workflow installs 1 instance of sparrow and
# verify the API output
name: End-to-End Testing

name: End2End Testing
on:
push:
pull_request:
Expand All @@ -10,48 +8,39 @@ jobs:
end2end:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up K3S
uses: debianmaster/actions-k3s@master
id: k3s
with:
version: 'v1.26.9-k3s1'
- name: Check Coredns Deployment
run: |
kubectl -n kube-system rollout status deployment/coredns --timeout=60s
STATUS=$(kubectl -n kube-system get deployment coredns -o jsonpath={.status.readyReplicas})
if [[ $STATUS -ne 1 ]]
then
echo "Deployment coredns not ready"
kubectl -n kube-system get events
exit 1
else
echo "Deployment coredns OK"
fi
- name: Setup Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
helm version
- name: Get Image Tag
id: version
run: echo "value=commit-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Install py-kube-downscaler
run: |
helm upgrade -i sparrow \
--atomic \
--timeout 300s \
--set image.tag=${{ steps.version.outputs.value }} \
--set sparrowConfig.name=the-sparrow.com \
--set sparrowConfig.loader.type=file \
--set sparrowConfig.loader.interval=5s \
--set sparrowConfig.loader.file.path=/config/.sparrow.yaml \
--set checksConfig.health.interval=1s \
--set checksConfig.health.timeout=1s \
./chart
- name: Wait for Sparrow
run: |
sleep 60
TODO: -> dynamisch mit kubectl befehl herausfinden
- name: Checkout Repo
uses: actions/checkout@v4

- name: Set up K3S
uses: debianmaster/actions-k3s@master
with:
version: 'v1.26.9-k3s1'

- name: Setup Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
helm version
- name: Get Image Tag
id: version
run: echo "value=commit-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Install py-kube-downscaler
run: |
helm upgrade -i py-kube-downscaler \
--atomic \
--timeout 300s \
--set image.tag=${{ steps.version.outputs.value }} \
./chart
- name: Verify Deployment
run: |
kubectl rollout status deployment/py-kube-downscaler --timeout=60s
STATUS=$(kubectl get deployment py-kube-downscaler -o jsonpath='{.status.readyReplicas}')
if [[ "$STATUS" -ne 1 ]]; then
echo "Deployment py-kube-downscaler not ready"
kubectl get events
exit 1
fi
echo "Deployment py-kube-downscaler OK"

0 comments on commit 601868e

Please sign in to comment.