Skip to content

Merge pull request #267 from fluxcd/backport-token #85

Merge pull request #267 from fluxcd/backport-token

Merge pull request #267 from fluxcd/backport-token #85

Workflow file for this run

name: e2e
on:
pull_request:
push:
branches:
- main
jobs:
kind:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Setup Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version: 1.25.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Setup Kubernetes
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
version: v0.30.0
cluster_name: kind
- name: Setup Kustomize
uses: fluxcd/pkg/actions/kustomize@main
- name: Run tests
run: make test
- name: Check if working tree is dirty
run: |
if [[ $(git diff --stat) != '' ]]; then
git --no-pager diff
echo 'run make test and commit changes'
exit 1
fi
- name: Build container image
run: |
make docker-build IMG=test/source-watcher:latest \
BUILD_PLATFORMS=linux/amd64 \
BUILD_ARGS=--load
- name: Load test image
run: kind load docker-image test/source-watcher:latest
- name: Deploy controllers
run: |
make dev-deploy IMG=test/source-watcher:latest
kubectl -n source-system rollout status deploy/source-controller --timeout=1m
kubectl -n source-system rollout status deploy/source-watcher --timeout=1m
- name: Source composition tests
run: |
kubectl apply -k config/testdata/composition
kubectl -n composition wait artifactgenerator -l role=test --for=condition=ready --timeout=1m
kubectl -n composition get artifactgenerators -o yaml
kubectl -n composition get externalartifacts -o yaml
- name: Source decomposition tests
run: |
kubectl apply -k config/testdata/decomposition
kubectl -n decomposition wait artifactgenerator -l role=test --for=condition=ready --timeout=1m
kubectl -n decomposition get artifactgenerators -o yaml
kubectl -n decomposition get externalartifacts -o yaml
- name: Logs
if: always()
run: |
kubectl -n source-system logs deploy/source-controller
kubectl -n source-system logs deploy/source-watcher