Repository navigation
Test on real Azure DevOps agents and publish to the Marketplace with Entra OIDC - #12
Merged
Merged
Conversation
- Package a dev variant of the extension (onek8s.container-build-dev, task ContainerBuildDev, own ids, increasing patch version) - New workflow: GitHub OIDC -> Entra service principal -> Azure DevOps token; publish the dev extension privately to the test organization, wait until it is installed, queue test/azure-devops/e2e.yml and wait for the result (failed steps are reported) - Test pipeline: ACR via Docker Registry and Azure Resource Manager service connections with workload identity federation, malware block, and optionally zero-config on a Managed DevOps Pool - Release workflow publishes to the Marketplace with the same OIDC service principal instead of a PAT secret - Setup script for the Entra app/federated credentials and test ACR, and docs/azure-devops-e2e.md for the Azure DevOps and Marketplace steps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HpAsQazVvi679PqLz7o1C1
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an end-to-end test loop on real Azure DevOps agents, and Marketplace publishing, both authenticated with GitHub OIDC → Microsoft Entra service principal. No PAT or other secret is stored. Microsoft documents service principals publishing with an Entra token: command-line publishing, "Publish with a Microsoft Entra token".
Dev extension (
scripts/package-azure.mjs)--dev --patch Npackagesonek8s.container-build-devwith its own task ID and name (ContainerBuildDev) and version<major>.<minor>.N, so it can be installed next to the released extension.npm run package:azureuses the same script for the normal package.Workflow
azure-devops-e2e.ymlEnabled by the repository variable
ADO_ORGANIZATION. It runs for PRs from this repo, pushes tomainand on demand. Runs are serialized, because Marketplace versions must increase and the org has one dev extension installed.run_number * 100 + attempt.azure/loginusing OIDC, environmentazure-devops-e2e, then get a token for the Azure DevOps resource499b84ac-….id, which is needed to add it to the Marketplace publisher.tfx extension publish --share-with <org>.scripts/azure-devops-e2e.mjs:test/azure-devops/e2e.ymlfor the PR branchTest pipeline
test/azure-devops/e2e.ymlimage,digest,vulnerabilities,sbom).azureSubscription+registry).Release
release.ymlpublishesonek8s.container-buildwith the same service principal, using environmentmarketplace, as soon asAZURE_DEVOPS_CLIENT_IDis set. This replaces theAZURE_DEVOPS_MARKETPLACE_TOKENsecret.Setup
scripts/setup-azure-devops-e2e.shcreates the Entra app and service principal, federated credentials for both GitHub environments, and optionally a test ACR.docs/azure-devops-e2e.mdcovers the Marketplace publisher, the Azure DevOps org (service principal user, extension manager, service connections, pipeline) and the GitHub variables.Testing
.vsixwas built and inspected: its own extension ID and version, and the task ID, name and version from the patch number.bash -npasses on the setup script.docs/azure-devops-e2e.md. UntilADO_ORGANIZATIONis set the new workflow is skipped, and the release publishing step stays off untilAZURE_DEVOPS_CLIENT_IDis set.Generated by Claude Code