From 25a8ff5f48eb56309681a5541cd8bd6b83d09995 Mon Sep 17 00:00:00 2001 From: Entlein Date: Fri, 29 May 2026 13:45:17 +0200 Subject: [PATCH] ci: add edge-cluster-trigger workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Smoke-test workflow that fires SovereignSOC's edge-cluster ADO pipeline via the shared composite action at k8sstormcenter/actions/ trigger-ado-pipeline. workflow_dispatch only for now — once the chain is verified, we can fold it into component-tests.yaml as a pre-step that resets the target edge slot before the 33-test component suite runs against it. Required GH config (one-off): secrets.ADO_PAT (org-level, scope Build:Read & Execute) vars.ADO_ORG = AustrianDataLab vars.ADO_PROJECT = SovereignSOC vars.ADO_PIPELINE_EDGE = 61 A guard step fails fast if any of those are missing, with the exact key names to set. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/edge-cluster-trigger.yml | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/edge-cluster-trigger.yml diff --git a/.github/workflows/edge-cluster-trigger.yml b/.github/workflows/edge-cluster-trigger.yml new file mode 100644 index 000000000..1617884a0 --- /dev/null +++ b/.github/workflows/edge-cluster-trigger.yml @@ -0,0 +1,95 @@ +# Trigger a SovereignSOC ADO edge-cluster lifecycle run. +# Smoke test for the GH→ADO trigger path. Once stable, this can be folded +# into component-tests.yaml as a pre-step that resets the target cluster +# before component tests run against it. +# +# Setup contract (k8sstormcenter/actions repo + SovereignSOC docs): +# secrets.ADO_PAT — PAT with Build:Read & Execute +# vars.ADO_ORG — AustrianDataLab +# vars.ADO_PROJECT — SovereignSOC +# vars.ADO_PIPELINE_EDGE — pipeline definition ID for edge-cluster.yml +name: edge-cluster-trigger + +on: + workflow_dispatch: + inputs: + cluster: + description: 'Edge cluster slot' + required: true + default: 'edge4' + type: choice + options: + - edge4 + - k3s-1 + - k3s-2 + - rocky-1 + action: + description: 'Lifecycle action' + required: true + default: 'plan' + type: choice + options: + - plan + - create + - delete + - reset + os: + description: 'Base OS' + required: true + default: 'ubuntu' + type: choice + options: + - ubuntu + - rocky + wait: + description: 'Wait for ADO run to complete' + required: true + default: 'true' + type: boolean + +jobs: + trigger: + runs-on: ubuntu-latest + steps: + - name: Guard — config sanity + env: + ADO_PAT: ${{ secrets.ADO_PAT }} + ADO_ORG: ${{ vars.ADO_ORG }} + ADO_PROJECT: ${{ vars.ADO_PROJECT }} + ADO_PIPELINE_EDGE: ${{ vars.ADO_PIPELINE_EDGE }} + run: | + missing=() + [[ -n "$ADO_PAT" ]] || missing+=("secrets.ADO_PAT") + [[ -n "$ADO_ORG" ]] || missing+=("vars.ADO_ORG") + [[ -n "$ADO_PROJECT" ]] || missing+=("vars.ADO_PROJECT") + [[ -n "$ADO_PIPELINE_EDGE" ]] || missing+=("vars.ADO_PIPELINE_EDGE") + if [[ ${#missing[@]} -gt 0 ]]; then + echo "::error::Missing required config: ${missing[*]}" + echo "Set them per docs at k8sstormcenter/actions/trigger-ado-pipeline/README.md" + exit 1 + fi + echo "✔ All required config present" + + - id: ado + uses: k8sstormcenter/actions/trigger-ado-pipeline@main + with: + org: ${{ vars.ADO_ORG }} + project: ${{ vars.ADO_PROJECT }} + pipeline_id: ${{ vars.ADO_PIPELINE_EDGE }} + pat: ${{ secrets.ADO_PAT }} + cluster: ${{ inputs.cluster }} + action: ${{ inputs.action }} + os: ${{ inputs.os }} + wait: ${{ inputs.wait }} + timeout: '1800' + + - name: Summary + if: always() + run: | + echo "### ADO run" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "- cluster: \`${{ inputs.cluster }}\`" >> "$GITHUB_STEP_SUMMARY" + echo "- action: \`${{ inputs.action }}\`" >> "$GITHUB_STEP_SUMMARY" + echo "- run id: ${{ steps.ado.outputs.run_id }}" >> "$GITHUB_STEP_SUMMARY" + echo "- url: ${{ steps.ado.outputs.run_url }}" >> "$GITHUB_STEP_SUMMARY" + echo "- result: ${{ steps.ado.outputs.result }}" >> "$GITHUB_STEP_SUMMARY"