202 lines
7.7 KiB
YAML
202 lines
7.7 KiB
YAML
# SPDX-FileCopyrightText: 2026 Coffey Labs LLC
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# The lab end to end on fresh GitHub runners (K-L1, K-L8): lab/tools.sh,
|
|
# then lab/e2e.sh, on each Kubernetes minor in lab/kubernetes.json (kind
|
|
# node images pinned by digest) and each runner architecture.
|
|
#
|
|
# - nightly, on every push here, and by hand: the chart's main, three
|
|
# minors on amd64 and arm64
|
|
# - called by inbuxa-charts for each chart branch (workflow_call): that
|
|
# chart commit, the architectures it asks for
|
|
#
|
|
# Runs on the GitHub replicas only (vars.BUILD_ON, the caller's when
|
|
# called), where the runners are; Gitea runs .gitea/workflows instead.
|
|
name: e2e
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "17 9 * * *" # 02:17 in Arizona
|
|
workflow_dispatch:
|
|
# Every branch: the lab's PRs are on Gitea, its branches reach GitHub by
|
|
# the push mirror
|
|
push:
|
|
workflow_call:
|
|
inputs:
|
|
chart_ref:
|
|
description: the inbuxa-charts commit or branch to test
|
|
type: string
|
|
required: true
|
|
lab_ref:
|
|
description: the inbuxa-k8s-lab commit or branch to test with
|
|
type: string
|
|
default: main
|
|
architectures:
|
|
description: JSON list of runner labels
|
|
type: string
|
|
default: '["ubuntu-24.04", "ubuntu-24.04-arm"]'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: e2e-${{ github.repository }}-${{ github.ref }}-${{ inputs.chart_ref || 'main' }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
matrix:
|
|
if: ${{ vars.BUILD_ON == 'github' }}
|
|
runs-on: ubuntu-24.04
|
|
outputs:
|
|
kubernetes: ${{ steps.m.outputs.kubernetes }}
|
|
newest: ${{ steps.m.outputs.newest }}
|
|
runners: ${{ steps.m.outputs.runners }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: inbuxa/inbuxa-k8s-lab
|
|
ref: ${{ inputs.lab_ref || github.sha }}
|
|
persist-credentials: false
|
|
sparse-checkout: lab/kubernetes.json
|
|
sparse-checkout-cone-mode: false
|
|
- id: m
|
|
env:
|
|
RUNNERS: ${{ inputs.architectures || '["ubuntu-24.04", "ubuntu-24.04-arm"]' }}
|
|
run: |
|
|
echo "kubernetes=$(jq -c . lab/kubernetes.json)" >> "$GITHUB_OUTPUT"
|
|
echo "newest=$(jq -c '.[-1]' lab/kubernetes.json)" >> "$GITHUB_OUTPUT"
|
|
echo "runners=$(jq -c . <<<"$RUNNERS")" >> "$GITHUB_OUTPUT"
|
|
|
|
e2e:
|
|
needs: matrix
|
|
name: e2e (${{ matrix.kubernetes.minor }}, ${{ matrix.runner }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
runner: ${{ fromJSON(needs.matrix.outputs.runners) }}
|
|
kubernetes: ${{ fromJSON(needs.matrix.outputs.kubernetes) }}
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 40
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: inbuxa/inbuxa-k8s-lab
|
|
ref: ${{ inputs.lab_ref || github.sha }}
|
|
path: inbuxa-k8s-lab
|
|
persist-credentials: false
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: inbuxa/inbuxa-charts
|
|
# the caller's chart commit; otherwise main, or the branch the repo
|
|
# variable CHART_REF names
|
|
ref: ${{ inputs.chart_ref || vars.CHART_REF || 'main' }}
|
|
path: inbuxa-charts
|
|
persist-credentials: false
|
|
- name: Tools (pinned, checksummed)
|
|
run: |
|
|
inbuxa-k8s-lab/lab/tools.sh "$HOME/.local/bin"
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
- name: The runner
|
|
run: |
|
|
nproc; free -h | head -2; df -h / | tail -1
|
|
docker version --format 'docker {{.Server.Version}}'
|
|
- name: Lab end to end
|
|
env:
|
|
KIND_NODE_IMAGE: ${{ matrix.kubernetes.image }}
|
|
E2E_LABEL: Kubernetes ${{ matrix.kubernetes.minor }}, ${{ matrix.runner }}
|
|
run: inbuxa-k8s-lab/lab/e2e.sh
|
|
- name: Memory at the end
|
|
if: always()
|
|
run: |
|
|
free -h | head -2
|
|
docker stats --no-stream --format '{{.Name}} {{.MemUsage}}' || true
|
|
|
|
# The chaos tests (K-L4): the lab's own runs only (nightly, by hand, its
|
|
# pushes), not a chart branch's, which stays quick. Newest minor, both
|
|
# architectures.
|
|
chaos:
|
|
needs: matrix
|
|
if: ${{ inputs.chart_ref == '' }}
|
|
name: chaos (${{ fromJSON(needs.matrix.outputs.newest).minor }}, ${{ matrix.runner }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
runner: ${{ fromJSON(needs.matrix.outputs.runners) }}
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: inbuxa/inbuxa-k8s-lab
|
|
ref: ${{ github.sha }}
|
|
path: inbuxa-k8s-lab
|
|
persist-credentials: false
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: inbuxa/inbuxa-charts
|
|
ref: ${{ vars.CHART_REF || 'main' }}
|
|
path: inbuxa-charts
|
|
persist-credentials: false
|
|
- name: Tools (pinned, checksummed)
|
|
run: |
|
|
inbuxa-k8s-lab/lab/tools.sh "$HOME/.local/bin"
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
- name: Lab end to end, then chaos
|
|
env:
|
|
KIND_NODE_IMAGE: ${{ fromJSON(needs.matrix.outputs.newest).image }}
|
|
E2E_LABEL: chaos, Kubernetes ${{ fromJSON(needs.matrix.outputs.newest).minor }}, ${{ matrix.runner }}
|
|
CHAOS: "1"
|
|
run: inbuxa-k8s-lab/lab/e2e.sh
|
|
|
|
# GitOps (K-L10): the chart installed, upgraded and crossed from 2026.x by
|
|
# Argo CD and by Flux instead of Helm. The lab's own runs, newest minor,
|
|
# both architectures.
|
|
gitops:
|
|
needs: matrix
|
|
if: ${{ inputs.chart_ref == '' }}
|
|
name: gitops (${{ matrix.tool }}, ${{ fromJSON(needs.matrix.outputs.newest).minor }}, ${{ matrix.runner }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
runner: ${{ fromJSON(needs.matrix.outputs.runners) }}
|
|
tool: [argocd, flux]
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 75
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: inbuxa/inbuxa-k8s-lab
|
|
ref: ${{ github.sha }}
|
|
path: inbuxa-k8s-lab
|
|
persist-credentials: false
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: inbuxa/inbuxa-charts
|
|
ref: ${{ vars.CHART_REF || 'main' }}
|
|
path: inbuxa-charts
|
|
persist-credentials: false
|
|
- name: Tools (pinned, checksummed)
|
|
run: |
|
|
inbuxa-k8s-lab/lab/tools.sh "$HOME/.local/bin"
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
- name: Lab end to end through ${{ matrix.tool }}, then its tests and the crossing
|
|
env:
|
|
KIND_NODE_IMAGE: ${{ fromJSON(needs.matrix.outputs.newest).image }}
|
|
E2E_LABEL: ${{ matrix.tool }}, Kubernetes ${{ fromJSON(needs.matrix.outputs.newest).minor }}, ${{ matrix.runner }}
|
|
INSTALL_WITH: ${{ matrix.tool }}
|
|
run: inbuxa-k8s-lab/lab/e2e.sh
|
|
- name: What the controller said
|
|
if: failure()
|
|
env:
|
|
TOOL: ${{ matrix.tool }}
|
|
run: |
|
|
if [ "$TOOL" = argocd ]; then
|
|
kubectl -n argocd get application inbuxa -o yaml | sed -n '/^status:/,$p' | head -150
|
|
kubectl -n argocd logs statefulset/argocd-application-controller --tail=80 || true
|
|
else
|
|
kubectl -n flux-system get helmrelease inbuxa -o yaml | sed -n '/^status:/,$p' | head -150
|
|
kubectl -n flux-system logs deploy/helm-controller --tail=80 || true
|
|
fi
|
|
kubectl -n inbuxa get jobs,pods -o wide || true
|
|
kubectl -n inbuxa logs job/inbuxa-upgrade --tail=40 || true
|