|
| 1 | +name: e2e |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: [ '*' ] |
| 7 | + tags-ignore: [ '*' ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + kubernetes: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + - name: Checkout |
| 14 | + uses: actions/checkout@v2 |
| 15 | + - name: Setup Flux |
| 16 | + uses: fluxcd/flux2/action@main |
| 17 | + - name: Setup Kubernetes |
| 18 | + |
| 19 | + with: |
| 20 | + version: "v0.10.0" |
| 21 | + image: "kindest/node:v1.20.2" |
| 22 | + - name: Install Flux in Kubernetes Kind |
| 23 | + run: flux install |
| 24 | + - name: Setup cluster reconciliation |
| 25 | + run: | |
| 26 | + flux create source git flux-system \ |
| 27 | + --url=${{ github.event.repository.html_url }} \ |
| 28 | + --branch=${GITHUB_REF#refs/heads/} |
| 29 | + flux create kustomization flux-system \ |
| 30 | + --source=flux-system \ |
| 31 | + --path=./clusters/my-cluster |
| 32 | + - name: Verify cluster reconciliation |
| 33 | + run: | |
| 34 | + kubectl -n flux-system wait kustomization/istio-operator --for=condition=ready --timeout=1m |
| 35 | + kubectl -n flux-system wait kustomization/istio-system --for=condition=ready --timeout=1m |
| 36 | + kubectl -n flux-system wait kustomization/apps --for=condition=ready --timeout=1m |
| 37 | + kubectl -n prod wait canary/frontend --for=condition=promoted |
| 38 | + kubectl -n prod wait canary/backend --for=condition=promoted |
| 39 | + - name: List canaries |
| 40 | + run: | |
| 41 | + kubectl -n prod get canaries |
| 42 | + - name: Debug failure |
| 43 | + if: failure() |
| 44 | + run: | |
| 45 | + kubectl -n flux-system get all |
| 46 | + kubectl -n flux-system logs deploy/source-controller |
| 47 | + kubectl -n flux-system logs deploy/kustomize-controller |
| 48 | + kubectl -n flux-system logs deploy/helm-controller |
| 49 | + kubectl -n istio-operator get all |
| 50 | + kubectl -n istio-system get all |
| 51 | + kubectl -n prod get all |
0 commit comments