Repository navigation
feat(ci): add Azure Pipelines npm publisher and Otto release trigger - #9744
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | No changes required. |
| Commit Type | ✅ | feature is selected correctly and only once. |
| Risk Level | ✅ | risk:medium matches the selected Medium level; clarify why the risk is Medium rather than Low. |
| What & Why | ✅ | Content is complete; revise the low-risk wording for consistency. |
| Impact of Change | ✅ | Users, Developers, and System impacts are documented. |
| Test Plan | ✅ | Unit tests are present in the diff and live validation is documented. |
| Contributors | Optionally credit additional contributors and reviewers. | |
| Screenshots/Videos | ✅ | Correctly marked not applicable. |
✅ The PR title and body pass review. Before merging, consider clarifying the Medium-risk justification so it does not conflict with the statement that the risk is ideally Low.
Powered by: Logic App (fallback) | Last updated: Wed, 25 Nov 2026 14:47:30 GMT
Contributor
📊 Coverage CheckNo source files changed in this PR. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The publisher can execute and publish tags from unmerged feature branches without ancestry validation, while publishing older releases with --tag latest can downgrade default installs and leave library tags inconsistent.
2 open issues
What changed in this PR
Adds a manual Azure Pipelines release path for publishing nine LogicAppsUX npm packages to Azure Artifacts. Existing GitHub versioning and release workflows remain unchanged.
Changes:
- Adds a branch-gated 1ES pipeline with Workload Identity Federation authentication.
- Builds release tags in detached worktrees, bootstraps pinned pnpm, and publishes missing package versions.
- Adds unit tests for build/publish behavior, error handling, and pipeline configuration.
| File | Description |
|---|---|
scripts/ado-npm-publisher.test.cjs |
Tests release helpers, publishing behavior, and pipeline invariants. |
scripts/ado-npm-publisher.cjs |
Implements tagged builds, package packing, and feed publishing. |
.azure-pipelines/npm-publish.yml |
Defines the manual authenticated build-and-publish pipeline. |
Review effort: Balanced
5 of 14 tasks
Replace legacy direct npm publishing in version-release.yml with a publish-npm job that invokes the Otto trigger-npm-publish workflow via the E2ETesting environment secret, guard Azure login on blob upload, and add workflow invariant tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add compareSemver and resolvePublishDistTag in ado-npm-publisher.cjs so publishing a version lower than the feed's dist-tags.latest uses --tag hotfix instead of downgrading latest, while failing fast on non-404 feed errors. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Set top-level `name` in `.azure-pipelines/npm-publish.yml` to
`${{ coalesce(trim(parameters.releaseVersion), 'unversioned') }}-$(Date:yyyyMMdd)$(Rev:.r)`
so each ADO publish run captures the package version being published at queue time.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Carlos Castro Trejo (ccastrotrejo)
approved these changes
Nov 25, 2026
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.


Commit Type
Risk Level
Justification: Plain CI/npm publishing automation only — zero client, designer, or shipped product/runtime code is modified, and no repo-governance write permissions are added (
publish-npmusescontents: read). Full GitHub -> Otto -> ADO -> npm feed flow is already verified end-to-end._What & Why
This doesn't make any user impact so ideally risk is low across. It updates the npm publishing steps only. Adds an Azure Pipelines 1ES Official release pipeline (
.azure-pipelines/npm-publish.yml) and publisher script (scripts/ado-npm-publisher.cjs) to build and publish the 9 LogicAppsUX npm packages to the Azure Artifacts npm feed using Workload Identity Federation (WIF), and wires.github/workflows/version-release.ymlto trigger it automatically through the Ottotrigger-npm-publishworkflow on the triggering branch after a GitHub Release is created.Files Changed
.azure-pipelines/npm-publish.yml: Single-stage (Publish), single-job (BuildAndPublish) 1ES Official pipeline (v1/1ES.Official.PipelineTemplate.yml@1esPipelinesatrefs/tags/release, poolAzure-Pipelines-1ESPT-ExDShared,sdl.componentgovernance.useAgentBuildDirectory: true).refs/heads/mainandrefs/heads/hotfix/v*viaand(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/hotfix/v'))).https://pkgs.dev.azure.com/msazure/One/_packaging/microsoft-logic-apps/npm/registry/usingnpmAuthenticate@0with WIF service connection21d5a1d8-11d3-425c-8d3a-e7f088725481..github/workflows/version-release.yml:publish-npmjob (needs: create-release,environment: E2ETesting,permissions: { contents: read }) that invokes${{ secrets.OTTO_NPM_PUBLISH_WORKFLOW_URL }}with{ releaseVersion, tagName, sourceBranch, repository, githubRunUrl, dryRun: false }, accepts HTTP200(skipped) or202(queued), and writes the ADO build ID and URL to$GITHUB_STEP_SUMMARY.Generate NPMRCandPublish to NPMsteps frombuild-and-publish, and guardsAzure loginwithif: ${{ github.event.inputs.enable_blob_upload == 'true' }}so blob upload remains unchanged when enabled without blocking releases when disabled.scripts/ado-npm-publisher.cjs: Self-contained Node script withbuildandpublishcommands:releaseVersion(e.g.5.1025.0), resolvesrefs/tags/v<releaseVersion>locally, and checks it out into a clean detached worktree retained underAgent.BuildDirectoryfor Component Governance.pnpmfrom the 1ES npm mirror using the exactpackageManagerversion inpackage.json.pnpm install --recursive --frozen-lockfile --strict-peer-dependencies,node scripts/update-versions.js <releaseVersion>,pnpm run build:lib, andpnpm packfor all 9 publishable packages.<name>@<releaseVersion>already present in the feed (npm view), resolving the dist-tag viaresolvePublishDistTag+compareSemver(--tag latestwhenversion >= currentLatestor package not yet in feed,--tag hotfixwhenversion < currentLatestso older hotfixes never downgradelatest, failing loudly on non-404 feed errors), and runningnpm publish <tarball> --tag <distTag>.scripts/ado-npm-publisher.test.cjs: Unit and YAML invariant tests covering version parsing, SemVer comparison, dist-tag resolution (latestvshotfix, 404, prerelease, non-404 error handling), tag resolution, 1ES-mirrorpnpmbootstrap, build/pack + worktree retention, feed lookup states, idempotent skip/publish behavior,.azure-pipelines/npm-publish.yml, and.github/workflows/version-release.yml.Impact of Change
dist-tags.latestprotected against older hotfix downgrades.Version and Release; after GitHub creates the tag and release,publish-npminvokes Otto (laux-prs/trigger-npm-publish) to queue ADO pipeline489908automatically on the same triggering branch (refs/heads/mainorrefs/heads/hotfix/v*).489908with WIF (npmAuthenticate@0) and Branch Control; usesE2ETestingenvironment secretOTTO_NPM_PUBLISH_WORKFLOW_URL(restricted tomain,hotfix/*,krmitta/e2e-test-api).Test Plan
laux-prs) -> Hosted ADO Pipeline489908->microsoft-logic-appsnpm feedValidation Results
npx biome check scripts/ado-npm-publisher.cjs scripts/ado-npm-publisher.test.cjs— passed (0 errors)node --test scripts/ado-npm-publisher.test.cjs— passed (15/15 tests)ruby -ryaml -e "YAML.load_file('.azure-pipelines/npm-publish.yml'); YAML.load_file('.github/workflows/version-release.yml')"— passed (YAML OK)publish-npmshell step syntax (bash -n) and 7 stubbed-curlsmoke cases — all passedhotfix/v2.9999(release_type=patch,enable_blob_upload=false): all 4 jobs succeeded (validation,create-release->v2.9999.1,publish-npm-> OttoHTTP 202 queued,build-and-publish).refs/heads/hotfix/v2.9999:completed/succeeded(Build and publish npm packages,Component Governance,SDLSources, andAgentless Tagall succeeded); published all 9/9 packages at2.9999.1under--tag hotfix; verified all 9 packages onmicrosoft-logic-appspreserveddist-tags.latest = 5.1025.0. Temporary releasev2.9999.1, tag, andhotfix/v2.9999branch cleaned up.latestPublish E2E Run: Pipeline 489908 / Build 193120731 — succeeded; built fromv5.1025.0, published all 9/9 packages at5.1025.0(dist-tags.latest = 5.1025.0), and passed Component Governance.400), disallowedsourceBranch(400), missing release (404), idempotent skip on5.1025.0(200), live queue (202), and MSIrotate-connection-keys(Succeeded).Contributors
Krrish Mittal (@takyyon)
Screenshots/Videos
N/A (CI pipeline, Otto webhook trigger, and release script only)