Files
kured/.github/workflows/manifests-tests.yml
T
Jean-Philippe Evrard 9ca74a6062 Simplify manifest testing
We don't need to test with kustomize, manifest testing is good
enough, as we just test that the manifest are correct, not that
they are functional (which would require a change in the poll time).
2020-11-26 14:14:18 +01:00

56 lines
1.8 KiB
YAML

#This:
#- Periodically ensures our latest releases manifest deploy correctly
#- Ensures that a PR changing any of the manifests (later used for
# producing a release) will not break a deployment of an existing release
# (so we can assume it will not break a new release either)
name: Manifest deploy
on:
pull_request:
paths:
- "**/kured-*.yaml"
schedule:
- cron: '0 0 1 * *'
jobs:
use-manifests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: "0"
# We need to unpin kind-action so we can test is new versions of kind
# and therefore kubernetes will break with our manifests
# This creates a 1 node cluster.
- name: Create a default kind cluster
uses: helm/kind-action@master
# kind-action already installed kind and kubectl.
# Hard code DH_ORG weaveworks so that all forks point to latest image
# from weaveworks.
- name: Deploy with kubectl
run: |
VERSION=$(curl -s https://api.github.com/repos/weaveworks/kured/releases | jq -r .[0].tag_name)
make DH_ORG=weaveworks VERSION=$VERSION manifest
kubectl apply -f kured-{rbac,ds}.yaml
- name: Show kured is deploying
run: |
sleep 10; kubectl describe ds kured -n kube-system
- name: Ensure kured is up
uses: nick-invision/retry@v1
with:
timeout_minutes: 10
max_attempts: 10
retry_wait_seconds: 60
# DESIRED CURRENT READY UP-TO-DATE AVAILABLE should all be =1
command: "kubectl get ds -n kube-system | grep -E 'kured.*1.*1.*1.*1.*1' "
- name: Show kured is successfully deployed
run: |
kubectl get ds -n kube-system