Merge pull request #129 from trakrf/miks2u/tra-856-orange-cloud-previ… #191
This file contains hidden or 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: 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). | |
| - cert-manager-config | |
| - traefik-config | |
| - trakrf-backend | |
| - trakrf-ingester | |
| - 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 | |
| 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 | |
| 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 |