Repository navigation
ci: migrate to 1ES and tag-triggered ESRP npm releases for 3.1.0 - #2026
Open
Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 3 commits into
Open
Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 3 commits into
Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 3 commits into
Conversation
Separate SDK build and tests from opt-in release artifact publication. Preserve the Node.js matrix and Linux build, and document pipeline authorization and downstream artifact compatibility. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ramses Sanchez-Hernandez (ramsessanchez)
requested a review
from a team
as a code owner
October 23, 2026 19:53
Bump package and generated SDK version to 3.1.0. Replace manual publication with tag-push CI gating, validate tags against the package version, and update release instructions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pack the built single-package SDK without lifecycle scripts and deploy the immutable tarball through the shared production ESRP environment. Retain tag-push-only release gating and document resource authorization, package scope, and legacy publisher cutover. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.
A similar PR may already be submitted! Please search among the Pull request before creating one.
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request.
NOTE: PR's will be accepted only in case of appropriate information is provided below
Summary
Migrate
.azure-pipelines/ci-build-production.ymlto the official 1ES template and model npm publication on the TypeScript SDK release pipeline, adapted to this SDK's single npm package.npm testalready includes browser tests.npm pack --ignore-scripts. Thesdk-buildPipeline Artifact contains the built npm tarball. Skipping lifecycle scripts deliberately prevents this SDK'sprepackhook from reinstalling dependencies, rebuilding, and rerunning tests during packing.IndividualCI/BatchedCI) enter the production deployment job. It usesmsgraph-npm-org, the shared federated DevX ESRP configuration and release owners/approvers, andEsrpRelease@9to distribute the downloaded tarball to npm. The same tarball is published asrelease-drop; no rebuild, repack, or dependency installation occurs during deployment. All manual runs, including manual tag runs, and main-branch pushes remain build-only.package.json, the root lockfile version entries, and generatedsrc/Version.tsto 3.1.0. Tag validation requires the exact package version (3.1.0, novprefix) before staging production artifacts.CONTRIBUTING.mdwith validation, deployment authorization, release-tag semantics, and legacy publisher cutover instructions.Explicit differences from the TypeScript SDK: retain this repo's tests, ordinary dependency restore, single-package layout, and unprefixed tag convention. Do not copy its monorepo packing loop, TypeScript-specific package feed, or Release Please automation. Its manual-deployment bypass is intentionally not adopted. Reuse of the shared deployment configuration and omission of Release Please were confirmed with the user.
Cutover: disable the old external npm publication trigger before enabling this ESRP route to avoid duplicate publication.
release-dropis now a Pipeline Artifact containing a.tgz, not the previous source-directory Build Artifact. Remaining consumers must support both changes. Confirm this pipeline's environment/service-connection access and ESRP authorization for@microsoft/microsoft-graph-client; the environment name does not prove access to the@microsoftscope.Motivation
Explain the motivation for making this change. What existing problem does the pull request solve?
Production build 252816 failed organization enforcement because it did not extend an approved 1ES/OneBranch template. The user requested separate build/publication stages, tag-push-only release artifacts, version 3.1.0, and a release flow modeled on the TypeScript SDK. Immutable packed artifacts and the shared production ESRP deployment model replace the previously implicit external publication path.
Test plan
Demonstrate the code is solid. Example: The exact commands you ran and their output.
Prior hosted validation: Azure DevOps build 253684 passed on commit
13b246d3c, including the Linux production build, Windows Node.js 22/24/26 tests, and SDL source analysis. This predates tag gating, the 3.1.0 bump, and the ESRP deployment changes; it is not evidence that the final publication path has run.Local validation used available Node.js v20.20.2/npm 10.8.2, not the required Node.js 22+ runtime:
git diff --check— passed.npm run build— passed for version 3.1.0 in the preceding commit; no SDK implementation changes were made afterward.npm run test:cjs -- --reporter dot— passed: 359 tests, in the preceding commit.npm pack --ignore-scripts --json --pack-destination $destination($destinationset to the session validation directory) — passed:microsoft-microsoft-graph-client-3.1.0.tgz, 451 entries. Verified actual tarball identity/version, generated CJS/ESM version constants, declared package entry points, declarations, browser bundles and auth-provider exports, and exclusions for test/build-only files. An initial assertion incorrectly expected compiled JavaScript under the source-onlyauthProviderOptionsfolder; corrected the check to its existing.tsbarrel and verified compiled barrels underauthProviders.npm install <generated tarball> --ignore-scripts --no-save --package-lock=false --no-audit --no-fund— tarball installation passed. Auth-provider smoke testing first identified the expected missing optional@azure/msal-browserdependency. Reinstalled the tarball together with the same MSAL 2.38.0 version used by this checkout; CJS Client initialization, package/generated version consistency, Azure credential provider import, and MSAL provider import all passed. No npm publication occurred.python -with inline YAML/JSON/tarball assertions and Node subprocess execution — passed: exact release-tag validation cases, package/version consistency, pipeline trigger/condition structure, immutable artifact input/output paths, and no deployment rebuild/pack. The deployment environment, pool, production release-job context, and all ESRP task inputs were compared with the current TypeScript SDK pipeline and matched exactly. These checks do not execute Azure's expression engine or private template expansion.Next hosted validation: manually queue this PR branch to validate packaging and the updated 1ES deployment schema without publishing. Manual runs skip Publish. Before pushing release tag
3.1.0on the intended release commit after merge tomain, confirm environment approval/check policies, service-connection/certificate access, ESRP package-scope permission, npm dist-tag policy, unpublished version, and legacy-publisher cutover. No release tag was created or pushed and neither ESRP nor npm publication was invoked from this session.Closing issues
N/A — no linked issue.
Types of changes
Pipeline behavior intentionally changes: branch/manual runs are build-only; release-tag CI deploys directly through ESRP. Artifact format and contents change to packed Pipeline Artifacts. This PR bumps the package version to 3.1.0 without adding SDK API changes.
Checklist