Merge pull request #117 from LeoColomb/patch-1 #89
This file contains 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: e2e | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ '*' ] | |
tags-ignore: [ '*' ] | |
jobs: | |
kubernetes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Flux | |
uses: fluxcd/flux2/action@main | |
- name: Setup Kubernetes | |
uses: helm/[email protected] | |
with: | |
cluster_name: flux | |
- name: Install Flux in Kubernetes Kind | |
run: flux install | |
- name: Setup cluster reconciliation | |
run: | | |
flux create source git flux-system \ | |
--url=${{ github.event.repository.html_url }} \ | |
--branch=${GITHUB_REF#refs/heads/} \ | |
--username=${GITHUB_ACTOR} \ | |
--password=${{ secrets.GITHUB_TOKEN }} \ | |
--ignore-paths="clusters/**/flux-system/" | |
flux create kustomization flux-system \ | |
--source=flux-system \ | |
--path=./clusters/staging | |
- name: Verify cluster reconciliation | |
run: | | |
kubectl -n flux-system wait kustomization/infra-controllers --for=condition=ready --timeout=5m | |
kubectl -n flux-system wait kustomization/apps --for=condition=ready --timeout=5m | |
- name: Verify helm reconciliation | |
run: | | |
kubectl -n podinfo wait helmrelease/podinfo --for=condition=ready --timeout=5m | |
- name: Debug failure | |
if: failure() | |
run: | | |
kubectl -n flux-system get all | |
kubectl -n flux-system logs deploy/source-controller | |
kubectl -n flux-system logs deploy/kustomize-controller | |
kubectl -n flux-system logs deploy/helm-controller | |
flux get all --all-namespaces |