Repository navigation
Move private-cluster integration test to 1ES pipeline - #549
Suneha Bose (bosesuneha) wants to merge 3 commits into
Conversation
GitHub-repo Federated Identity Credentials are being removed, so the private-cluster integration test moves from GitHub Actions to an Azure DevOps 1ES pipeline that authenticates via a WIF service connection. - Add .pipelines/1es-integration-tests-private.yml (extends 1ES Unofficial template; runs on staging-pool-amd64-mariner-2). - Invoke the node24 action via `node lib/index.js` with INPUT_* env vars. - Use a pre-created, shared resource group; create/delete only a per-build cluster (no az group create/delete). - Add optional resourceGroup= arg to k8s-deploy-test.py (defaults to cluster name) so verification targets the shared RG. - Delete the GitHub workflow whose FIC-based azure/login no longer authenticates.
18871df to
45b600f
Compare
|
Copilot resolve the merge conflicts in this pull request |
# Conflicts: # .github/workflows/run-integration-tests-private.yml
|
💡 Hiya Suneha Bose (@bosesuneha), I have made this commit, so rather than jsut commenting I will add the commit and collab with you!! The reason, adding context for the latest changes: Commit: ad1fb95 The original pipeline triggers introduced two aspects of interest:
A release-branch trigger alone would also not provide a true release gate. The release workflow could continue tagging and publishing while the integration test runs independently. The pipeline now uses: trigger: none
pr: noneIt is intended to be invoked only by the internal release orchestrator. Before any Azure-authenticated task runs, it verifies that:
The internal release pipeline should queue this test for the exact release-candidate commit and make tagging/publishing depend on its successful completion. This ensures the tested code is exactly the code being released. The update also makes execution more deterministic and secure by using npm ci, explicitly installing a pinned kubectl version, restoring the GitHub Action environment expected by the action, tagging temporary clusters, and surfacing cleanup failures. Azure DevOps UI triggers should remain disabled because UI trigger settings can override the YAML configuration. The WIF service connection should also use the minimum required role scoped to the shared integration-test resource group rather than subscription-wide Contributor or Owner permissions. |
|
Right now the pipeline has trigger: none/pr: none, so nothing actually runs it, and our GitHub release flow doesn't wait on any test before publishing. I'd like to turn this into a real release gate: split the release into a prepare step that just creates the releases/vX.Y.Z branch and a separate publish step, have this pipeline run automatically on releases/*, and post a status back to GitHub from ADO, that publishing waits on. Tatsat (Tats) Mishra 🐉 (@Tatsinnit) would love your thoughts. |
You're right that, as currently wired, this is not yet an operational release gate: a trusted component still needs to queue the pipeline, and publishing must wait for its result. I agree with splitting the release into prepare and publish phases and reporting the 1ES result back to GitHub. My concern is specifically with a direct I suggest this flow:
This gives us the real release gate you described without making privileged internal 1ES execution generally triggerable by GitHub branch or PR events. If the proposed automatic trigger is a governed bridge using a trusted pipeline definition and an immutable, validated SHA, then we are aligned; I mainly want that trust boundary to remain explicit. Just some thoughts to share and ideas for security first kind of approach ❤️ what do you think? |
GitHub-repo Federated Identity Credentials are being removed, so the private-cluster integration test moves from GitHub Actions to a release-gated Azure DevOps 1ES pipeline authenticated via a governed WIF service connection.
What changes
.azure-pipelines/1es-integration-tests-private.yml(extends the 1ES Unofficial template; runs onstaging-pool-amd64-mariner-2).azure/loginno longer authenticates.node lib/index.jswith explicitINPUT_*values and the GitHub context variables the action consumes.az group create/delete).resourceGroup=tok8s-deploy-test.py(defaults to the cluster name) so verification targets the shared resource group.Release-gate safety
The new 1ES definition deliberately declares:
It must not be attached to a PR branch policy or given a CI trigger. The pipeline uses a WIF service connection and therefore must not execute PR-controlled code or provision a private AKS cluster after every merge to
main.Before any Azure-authenticated task runs, the pipeline rejects the run unless all of these are true:
refs/heads/releases/vX.Y.Z;releaseCandidateCommitparameter;Build.SourceVersionand the checked-outHEAD;package.json.The internal release orchestrator must queue this pipeline for the exact release-candidate SHA and make tagging/publishing explicitly depend on its success. Merely triggering this pipeline when a release branch is created is not a release gate because publication could proceed concurrently.
Azure DevOps pipeline UI triggers must remain disabled because UI trigger settings can override YAML. The
k8s-deploy-intg-test-svc-connservice connection should use a custom role scoped tok8s-deploy-intg-rg, not subscription-wide Contributor or Owner.Additional hardening
npm cirather thannpm install.GITHUB_WORKSPACE,RUNNER_TEMP, commit/ref/run metadata, and action input defaults for parity with GitHub Action execution.set -euo pipefailfor scripts.condition: always(), but report deletion failures instead of swallowing them with|| true.Validation
js-yaml.npm run format-checkpasses.npm run typecheckpasses.npm testpasses: 29 files, 296 tests.npm run buildpasses.