Skip to content

fix: publish CDK npm package with OIDC - #790

Merged
nina9753 merged 1 commit into
mainfrom
nina.rei/svls-10010-npm-trusted-publishing
Nov 17, 2026
Merged

nina9753 merged 1 commit into
mainfrom
nina.rei/svls-10010-npm-trusted-publishing

Conversation

@nina9753

@nina9753 nina9753 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • publish datadog-cdk-constructs-v2 from a GitHub-hosted runner using npm trusted publishing/OIDC
  • preserve the current release ordering by triggering npm after the GitLab pipeline creates the GitHub release
  • validate that the release tag matches version.json before publishing

Validation

  • yarn install --immutable
  • Node 24 yarn pre-compile, yarn compile, and yarn package:js
  • workflow YAML parse and Prettier check
  • tag/version behavior check
  • git diff --check

Coordinated rollout

This is paired with ddoghq/serverless-ci#303, which removes the legacy Vault npm-token publication and keeps Go → PyPI → Maven → GitHub release ordering.

Before merging the pair and creating a release tag:

  1. Create the protected npm-publish GitHub environment and allow only v2-* tags.
  2. Configure the npm trusted publisher for package datadog-cdk-constructs-v2, repository DataDog/datadog-cdk-constructs, workflow publish.yml, and environment npm-publish.
  3. Use the next legitimate release as the end-to-end validation; confirm the npm publisher is GitHub Actions and that provenance is present before revoking the legacy token.

Jira: SVLS-10010

@nina9753 nina9753 changed the title [SVLS-10010] Publish CDK npm package with OIDC fix: publish CDK npm package with OIDC Nov 17, 2026
@nina9753
nina9753 force-pushed the nina.rei/svls-10010-npm-trusted-publishing branch from 4bc93b2 to 96e88b7 Compare November 17, 2026 18:15
@nina9753
nina9753 marked this pull request as ready for review November 17, 2026 18:29
@nina9753
nina9753 requested review from a team as code owners November 17, 2026 18:29
@nina9753
nina9753 requested a review from ava-silver November 17, 2026 18:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T18:30:22.780478Z 96e88b7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread CONTRIBUTING.md Outdated

At this point you're waiting on us. We may suggest some changes or improvements or alternatives.

## Releasing the v2 package

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes it sound like outside contributors can do releases, which isnt true. maybe better to just keep this in internal documentation?

@nina9753
nina9753 force-pushed the nina.rei/svls-10010-npm-trusted-publishing branch from 96e88b7 to e54cf36 Compare November 17, 2026 19:05
Comment thread .github/workflows/publish.yml Resolved
@joepeeples joepeeples self-assigned this Nov 17, 2026
@joepeeples joepeeples removed their assignment Nov 17, 2026
@nina9753
nina9753 merged commit 1ae97be into main Nov 17, 2026
11 of 12 checks passed
@nina9753
nina9753 deleted the nina.rei/svls-10010-npm-trusted-publishing branch November 17, 2026 21:01
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.

3 participants