Skip to content

Merge pull request #159 from trakrf/fix/preview-db-storage-20gi #259

Merge pull request #159 from trakrf/fix/preview-db-storage-20gi

Merge pull request #159 from trakrf/fix/preview-db-storage-20gi #259

Workflow file for this run

name: ci
on:
pull_request:
push:
branches: [main]
jobs:
tofu-fmt:
name: tofu fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: opentofu/setup-opentofu@v1
- run: tofu fmt -check -recursive
working-directory: terraform
tofu-validate:
name: tofu validate (${{ matrix.dir }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dir: [aws, azure, cloudflare, bootstrap, gcp]
steps:
- uses: actions/checkout@v4
- uses: opentofu/setup-opentofu@v1
- run: tofu init -backend=false -input=false
working-directory: terraform/${{ matrix.dir }}
- run: tofu validate
working-directory: terraform/${{ matrix.dir }}
helm:
name: helm lint + template (${{ matrix.chart }} / ${{ matrix.cluster }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
chart:
# helm/monitoring/ is a values-only wrapper (no Chart.yaml) for the
# upstream kube-prometheus-stack chart — applied via 'just
# monitoring-bootstrap CLUSTER', not lintable as a standalone chart.
# helm/cnpg/ is similar (values-only for upstream cnpg/cloudnative-pg).
# helm/trakrf-mosquitto/ is GKE-only (no eks/aks overlays) — linted in
# its own helm-mosquitto job below.
- cert-manager-config
- traefik-config
- trakrf-backend
- trakrf-db
cluster: [eks, aks]
steps:
- uses: actions/checkout@v4
- uses: azure/setup-helm@v4
- name: Lint chart with cluster overlay
run: |
helm lint helm/${{ matrix.chart }} \
-f helm/${{ matrix.chart }}/values.yaml \
-f helm/${{ matrix.chart }}/values-${{ matrix.cluster }}.yaml
- name: Template chart with cluster overlay
run: |
helm template helm/${{ matrix.chart }} \
-f helm/${{ matrix.chart }}/values.yaml \
-f helm/${{ matrix.chart }}/values-${{ matrix.cluster }}.yaml
helm-mosquitto:
# GKE-only broker chart (TRA-907) — not part of the eks/aks matrix above.
name: helm lint + template (trakrf-mosquitto / gke)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: azure/setup-helm@v4
- name: Lint chart with GKE overlay
run: |
helm lint helm/trakrf-mosquitto \
-f helm/trakrf-mosquitto/values.yaml \
-f helm/trakrf-mosquitto/values-gke.yaml
- name: Template chart with GKE overlay
run: |
helm template helm/trakrf-mosquitto \
-f helm/trakrf-mosquitto/values.yaml \
-f helm/trakrf-mosquitto/values-gke.yaml \
--set hostname=mqtt.preview.gke.trakrf.id \
--set loadBalancerIP=1.2.3.4
argocd-root:
name: helm template argocd/root (${{ matrix.cluster }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cluster: [eks, aks]
steps:
- uses: actions/checkout@v4
- uses: azure/setup-helm@v4
- name: Template root app-of-apps
run: |
helm template trakrf-root argocd/root \
--set cluster=${{ matrix.cluster }} \
--set certManagerIdentityClientId=fake \
--set tenantId=fake \
--set subscriptionId=fake \
--set dnsZoneResourceGroup=fake \
--set traefikLbIp=1.2.3.4 \
--set mainResourceGroupName=fake
# Back-compat aliases for branch-protection required contexts that
# predate TRA-438's cluster-overlay split. Each depends on both
# cluster variants of its chart's lint+template job and just reports
# success — remove these once branch protection is updated to require
# the new "chart / cluster" named checks instead.
helm-required-backend:
name: helm lint + template (trakrf-backend)
runs-on: ubuntu-latest
needs: helm
if: always()
steps:
- name: Verify prerequisite jobs succeeded
run: |
if [[ "${{ needs.helm.result }}" != "success" ]]; then
echo "helm matrix failed: ${{ needs.helm.result }}"
exit 1
fi
# The trakrf-ingester chart was retired in TRA-907 (replaced by the in-backend
# subscriber + the standalone helm/trakrf-mosquitto chart). This shim is kept
# ONLY so the legacy required status context stays green; drop it once branch
# protection no longer requires "helm lint + template (trakrf-ingester)".
helm-required-ingester:
name: helm lint + template (trakrf-ingester)
runs-on: ubuntu-latest
needs: helm
if: always()
steps:
- name: Verify prerequisite jobs succeeded
run: |
if [[ "${{ needs.helm.result }}" != "success" ]]; then
echo "helm matrix failed: ${{ needs.helm.result }}"
exit 1
fi