Skip to content

Move private-cluster integration test to 1ES pipeline - #549

Draft
Suneha Bose (bosesuneha) wants to merge 3 commits into
Azure:mainfrom
bosesuneha:move-pvt-intg-to-1es
Draft

Suneha Bose (bosesuneha) wants to merge 3 commits into
Azure:mainfrom
bosesuneha:move-pvt-intg-to-1es

Conversation

@bosesuneha

@bosesuneha Suneha Bose (bosesuneha) commented Jul 20, 2026 •

Copy link
Copy Markdown
Member

Move the private-cluster integration test from GitHub Actions to an explicitly queued ADO 1ES definition without changing the current automatic publisher.

Changes

  • Replace the GitHub private-cluster workflow with a 1ES definition that keeps CI and PR triggers disabled.
  • Load a reviewed pipeline-definition revision and fetch the exact release branch and commit separately from Azure/k8s-deploy.
  • Validate the candidate commit, package version, and committed bundle before Azure test steps; execute that bundle without rebuilding it.
  • Use explicit action inputs and candidate-specific GitHub context when running the action in ADO.
  • Create and delete only a tagged, per-build cluster in a pre-created resource group, with optional resourceGroup support in the integration verifier.
  • Keep cleanup in the reviewed checkout and report lookup/deletion errors instead of treating them as absence.
  • Add offline checkout, bundle, and cleanup tests and document coordinated prepare/test/publish activation.

The existing release workflow stays pinned and unchanged. This draft does not configure automatic ADO queueing, result reporting, or Azure permissions. Candidate checks do not authorize a run; trusted queueing and service-connection checks remain external.

Companion: Azure/action-release-workflows#43.

@bosesuneha

Copy link
Copy Markdown
Member Author

Copilot resolve the merge conflicts in this pull request

@Tatsinnit

Tatsat (Tats) Mishra 🐉 (Tatsinnit) commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

💡 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 main branch trigger would create a private AKS cluster after every merge, including documentation and dependency-only changes. This adds that anyone whose PR merged can trigger something in internal pipeline, also careful nit security cost to consider and resource usage.
  • A PR trigger targeting releases/* could allow PR-controlled code to execute with the WIF-backed Azure service connection. A pipeline with privileged Azure access should not run from an untrusted or mutable PR context.

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: none

It is intended to be invoked only by the internal release orchestrator. Before any Azure-authenticated task runs, it verifies that:

  • the source branch matches releases/vX.Y.Z;
  • the orchestrator supplied a full release-candidate commit SHA;
  • the supplied SHA matches both Build.SourceVersion and the checked-out HEAD;
  • the branch version matches the version in package.json.

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.

@bosesuneha

Copy link
Copy Markdown
Member Author

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.

@Tatsinnit

Tatsat (Tats) Mishra 🐉 (Tatsinnit) commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

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.

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 releases/* CI trigger. The intent behind trigger: none / pr: none is to prevent GitHub-controlled branch activity from directly executing code in internal 1ES with the WIF-backed service connection. Because the pipeline definition comes from the triggered revision, checks inside that YAML are not themselves a security boundary if the branch can be modified.

I suggest this flow:

  • Prepare creates releases/vX.Y.Z from an approved commit and records the immutable candidate SHA.
  • A trusted/governed release bridge queues the 1ES pipeline for exactly that SHA and supplies releaseCandidateCommit.
  • 1ES posts its result back to GitHub against that same SHA.
  • Publish waits for that successful result and verifies that the release branch/tag still points to the tested SHA.

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 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants