chore: move release publishing to Azure pipelines - #7674
chore: move release publishing to Azure pipelines#7674Jane Chu (janechu) wants to merge 19 commits into
Conversation
Move release publishing off GitHub Actions and onto two Azure Pipelines under .ado/pipelines/ (FAST CD Build and FAST CD), so release credentials never leave the Azure environment. FAST CD Build packs pending npm tarballs and paired Rust crates on every push to main; FAST CD signs those artifacts, publishes to npm/crates.io, and only then creates the git tag and GitHub release per package, so a publish failure never strands a tag. Replaces the nightly cd-github-releases.yml GitHub Actions workflow and the old download-github-releases.mjs/create-github-releases.mjs pair with pack-pending-releases.mjs, check-release-tags.mjs, read-release-manifest.mjs, and a shared publishable-workspaces.mjs helper. Updates check-publish-pipeline.mjs, CONTRIBUTING.md, and .github/workflows/README.md to match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5e1aa6a9-5ec9-4b4a-b088-9181bf93a95d
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5e1aa6a9-5ec9-4b4a-b088-9181bf93a95d
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9c779966-eecf-4fcc-a215-679e3cf03da9
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9c779966-eecf-4fcc-a215-679e3cf03da9
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9c779966-eecf-4fcc-a215-679e3cf03da9
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9c779966-eecf-4fcc-a215-679e3cf03da9
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9c779966-eecf-4fcc-a215-679e3cf03da9
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9c779966-eecf-4fcc-a215-679e3cf03da9
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9c779966-eecf-4fcc-a215-679e3cf03da9
Jane Chu (janechu)
left a comment
There was a problem hiding this comment.
Requesting changes for release-path consistency and retry safety.
| releaseCommit: $[ stageDependencies.ValidateArtifacts.Validate.outputs['release.releaseCommit'] ] | ||
| releaseTags: $[ stageDependencies.ValidateArtifacts.Validate.outputs['release.releaseTags'] ] | ||
| # When adding a new publishable package, add its package-specific | ||
| # variables here and a matching GitHubRelease@1 task below. See |
There was a problem hiding this comment.
validate-release-artifacts.mjs emits package outputs dynamically, but this list is a second, manual registry for GitHub-release coverage. A newly publishable workspace will still be tagged and handed to the registry publisher, yet it will have no GitHubRelease@1 task unless someone remembers to edit this YAML. Please add a CI/test guard that compares the publishable workspace set to the static release-task wiring and fails on missing coverage. The documentation-only instruction is not sufficient for a release path.
| }, | ||
| ); | ||
|
|
||
| if (response.status === 200) { |
There was a problem hiding this comment.
Here 200 means true, which feeds the GitHubRelease@1 skip condition. If a prior run created the release but failed while uploading assets, its retry skips the release even when manifest assets are absent. The invocation also provides neither token read by this function, and one transient API failure occurs after registry publication. Please pass a non-logged read credential, use bounded retry/backoff for transient failures, and return complete only when every manifest asset filename is present. Fail explicitly for incomplete releases and test these paths.
|
|
||
| function parsePackOutput(output) { | ||
| const packages = JSON.parse(output); | ||
| if (!Array.isArray(packages) || packages.length === 0 || !packages[0].filename) { |
There was a problem hiding this comment.
parsePackOutput accepts a nonempty array and trusts the first filename; it neither requires one record nor binds it to the selected workspace. The manifest can therefore advertise a wrong-but-valid .tgz if npm output is unexpected. Please require exactly one object with a safe filename and matching name/version, rejecting malformed, extra, and mismatched records with focused tests.
Pull Request
📖 Description
Moves release publishing off GitHub Actions and onto two Azure Pipelines under
.ado/pipelines/—azure-pipelines-build.yml(FAST CD Build) andazure-pipelines-cd.yml(FAST CD) — so release credentials never leave the Azure environment.FAST CD Buildtriggers on every push tomain, detects publishable workspaces whose${name}_v${version}tag doesn't yet exist onorigin, and packs their npm tarballs and paired Rust crates into pipeline artifacts.FAST CDtriggers automatically whenFAST CD Build'sBuildArtifactsstage completes, signs the artifacts, publishes to npm/crates.io viaFAST.Release.PipelineTemplate, and only then creates the git tag and GitHub release per package — publishing before tagging means a publish failure never strands a tag, so the nextFAST CD Buildrun automatically retries.cd-github-releases.ymlGitHub Actions workflow and the oldcreate-github-releases.mjs/download-github-releases.mjsscript pair, replacing them withpack-pending-releases.mjs,check-release-tags.mjs,read-release-manifest.mjs, and a sharedpublishable-workspaces.mjshelper.check-publish-pipeline.mjs(the PR-validation guardrail that keeps Azure CD task coverage in sync with publishable workspaces),CONTRIBUTING.md, and.github/workflows/README.mdto describe the new pipeline design.👩💻 Reviewer Notes
FAST CD BuildandFAST CDneed to be registered as pipelines in Azure DevOps and repointed at the new.ado/pipelines/azure-pipelines-build.yml/.ado/pipelines/azure-pipelines-cd.ymlpaths (and the old root-levelazure-pipelines-cd.ymlpipeline definition retired/repointed) before this change is effective. This is an operational/ADO-admin step outside of this repo's source and cannot be verified from GitHub tooling.FAST.Sign.PipelineTemplate.ymlandFAST.Release.PipelineTemplate.ymllive in the internalopen-source/FASTPipelineTemplatesAzure DevOps repository, which is not accessible from GitHub tooling. Their exact parameter contracts (in particular how they handle an absent artifact directory) could not be independently verified while authoring this pipeline — please confirm against the live templates during ADO pipeline registration/rollout. The empty-directory removal step in thePublishjob is a defense-in-depth measure taken because that contract could not be confirmed..github/workflows/README.md(FAST CDsection) — it's the key behavioral change from the prior design and affects retry/idempotency semantics.📑 Test Plan
node build/scripts/check-publish-pipeline.mjs— passes, verifies Azure CD coverage for all 4 publishable workspaces.node build/scripts/pack-pending-releases.mjs --check-only— passes, reports 0 pending releases against current tags.npm run checkchange— passes, no change file required (paths touched are all under beachball's ignored.github//tooling scope).node build/biome-changed.mjs check --staged— passes, checked 5 staged.mjsfiles, no fixes needed..ado/pipelines/*.ymlfiles parse as valid YAML.node --checksyntax validation on all new/modified.mjsscripts.✅ Checklist
General
$ npm run changeAgents