Repository navigation
ci: add publish-stable job with CircleCI OIDC, rename release.yml to legacy fallback [IDE-2483] - #468
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This comment has been minimized.
This comment has been minimized.
ffec5ab to
3c2fda3
Compare
c4d98e0 to
0cc687b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
nick-y-snyk
left a comment
There was a problem hiding this comment.
Looks good. Creating the release before the S3 upload, deriving the tag from the commit date, and skipping when the release exists make reruns safe. gh release create with an asset also creates a draft, uploads, then publishes, and it deletes the draft if the upload fails. So a retry won't leave a release without its ZIP.
The description could mention that --target "$CIRCLE_SHA1" fixes a bug in the legacy workflow. Its git tag had no arguments, so it only listed tags, and gh release create without --target tagged the default branch. A hotfix release run from hotfix/* got its tag on main HEAD.
Nits:
docs/release.mdsays to trigger from the UI only, never the API. Therun_stable_releasedescription inconfig.ymlsays "UI or API". Worth making them match.- The legacy workflow's name points at
docs/release.md, which never mentions it. Either add a line there or point the name atRELEASE.md, which has the fallback note. - The title is missing
[IDE-2483].
0cc687b to
82bc733
Compare
3c2fda3 to
6da9d96
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
[AI reply] False positive. CircleCI's |
This comment has been minimized.
This comment has been minimized.
4ae5adf to
33bfa0a
Compare
This comment has been minimized.
This comment has been minimized.
Description updated.
It could be triggered from either, but we only want people using the UI. (I don't want AI's running our release pipelines)
Updated it.
🙈 Added. |
33bfa0a to
951c1f0
Compare
dac3256 to
d726b7d
Compare
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
951c1f0 to
a40ff00
Compare
d726b7d to
6e71eb7
Compare
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
6e71eb7 to
2832e94
Compare
a40ff00 to
1786d12
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Cursor Bugbot correctly flagged that publish-stable's "Create release tag" step's git push origin "$TAG_NAME" would fail on first real run: CircleCI's built-in checkout step installs a read-only SSH deploy key plus a global url.ssh://git@github.com/.insteadOf https://github.com/ rewrite, so any git push -- HTTPS remote or not -- gets routed back over the read-only key. Nothing in this job configured push credentials. This exact mechanism is documented in another internal Snyk repo's CircleCI config. Rather than adding gh auth setup-git plus the insteadOf-unwind, a token-in-URL push, or a gh api .../git/refs call -- three patterns with real prior art elsewhere in the Snyk org -- collapse the two steps: gh release create <tag> --target <sha> creates both the tag and the release via the GitHub REST API, using the same GITHUB_TOKEN already used by the existing release step. No git push, no credential helper setup, no state to unwind. --target "$CIRCLE_SHA1" pins the tag to this pipeline's commit; without it, gh release create defaults to the default branch's HEAD, which would silently tag main instead of the branch's HEAD on the hotfix/release triggers this workflow accepts. Matches how release-legacy.yml has actually been working for 18 successful monthly releases: its own git tag line (with no argument) merely lists tags and never created one -- the tag has always been created implicitly by gh release create, same as here. Adds an explicit GITHUB_TOKEN presence check at the top of the step, mirroring build-sign's KEYSTORE/KEYSTORE_SHA/KEYSTORE_PASS pattern and naming the expected context, so a missing snyk-eclipse-plugin-github-release context surfaces as a clear error rather than a downstream "unauthenticated" from gh. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1786d12 to
28e36b0
Compare
PR Reviewer Guide 🔍
|

Description
Milestone 3 (part 2 of 2) of migrating snyk-eclipse-plugin's S3 publishing off static AWS keys onto CircleCI OIDC (IDE-2483). Stacked on #463 (the
stable-releaseworkflow scaffold).Replaces #464, which was merged by mistake (mis-click, unrelated to this PR's content — see #463's comment thread) and whose head branch GitHub auto-deleted on merge, so it can't be reopened. Same content, same commits.
What this adds
publish-stablejob: assumes thesnyk-assets-eclipse-writerIAM role via CircleCI OIDC, creates the GitHub release (tagging the commit as a side effect, with the update-site ZIP asset), and uploads the signed p2 repository tos3://snyk-assets/eclipse/stable/. Safe to retry (skips if the release already exists), so a partial failure can just be re-run on the same commit.gh release create --target "$CIRCLE_SHA1"pins the tag to the commit CircleCI actually built — the legacy workflow'sgit tag(no argument, so it only lists tags) plusgh release createwithout--targetmeant a hotfix release run fromhotfix/*got tagged againstmain's HEAD instead of the commit it signed.publish-stableinto thestable-releaseworkflow ci: add stable-release workflow scaffold on CircleCI OIDC [IDE-2483] #463 added, requiring onlybuild-sign-stable— no separate approval gate (the manual pipeline trigger itself is the deliberate act).publish-previewandpublish-stable) into a sharedcommands: verify-oidc-identity:block..github/workflows/release.yml→release-legacy.yml, kept fully functional as a manual fallback (still using the static AWS keys) until milestone 4 deletes it, once CircleCI's stable-release path has cut a real release successfully.RELEASE.md's trigger step to describe the CircleCI UI flow (deliberately UI-only, never the API — a documented discipline choice, not a technical restriction, so a stable release is always a deliberate human action).docs/release.mddocumenting why the two pipelines (CICDandstable-release) are fully independent — no shared jobs, requires-chain, or workspace.Context status
publish-stable'scontext: snyk-eclipse-plugin-github-releasenow exists (ProdSec created it directly) and has a realGITHUB_TOKENset. circleci-infra PR #66 formally defines it in Terraform.Merge gate — resolved
#463 merged the
stable-releasescaffold and ran once for real, but that run predated thesecurity-scans-stablecontext rename (endpoint-experience→developer-agentic-experience_endpoint-experience). A manualrun_stable_release=truetrigger onmainhas now re-verified the scaffold end-to-end with the renamed context — pipeline #2114, all jobs (test-linux/macos/windows-stable,security-scans-stable, secrets scan,build-sign-stable) green. Ready to merge.Final PR in the stack
#465 (draft, stacked on this one) deletes the GitHub Actions fallback and moves the shared upload script once this PR's path is proven working with a real stable release — see that PR for the full decommissioning runbook.
Checklist
main, all jobs greenScreenshots / GIFs
N/A — CI config change.
PR Stack — Merge Order
flowchart LR main(["main"]) PR1["#460 build-sign\nCircleCI signing"] PR2["#462 publish-preview\nCircleCI OIDC publish"] PR3["#463 stable-release scaffold\nworkflow + build-sign-stable"] PR4["publish-stable ← YOU ARE HERE\nreplaces #464, scaffold re-verified on main, ready to merge"] PR5["#465 remove legacy workflow\nholding for a real stable release via this PR's path"] main --> PR1 --> PR2 --> PR3 --> PR4 --> PR5 style PR4 fill:#ffd700,color:#000Depends on: #463
🤖 Generated with Claude Code
Note
Medium Risk
Changes the stable release path (GitHub tagging/releases and S3 publish) and AWS OIDC assumptions; mistakes could ship the wrong commit or channel, though manual trigger and identity checks reduce exposure.
Overview
Adds a
publish-stableCircleCI job to the manualstable-releaseworkflow: after OIDC intosnyk-assets-eclipse-writer, it creates a GitHub release (timestamp tag viagh,--target $CIRCLE_SHA1, update-site ZIP, idempotent skip on retry) and runs.github/upload-to-s3.sh stable.build-signnow persistsupdate-site/target/*.zipfor that asset; sharedverify-oidc-identityreplaces duplicated checks in preview publish.Release docs shift from GitHub Actions to CircleCI “Trigger Pipeline” with
run_stable_release=true, withrelease-legacy.ymlkept as fallback. Newdocs/release.mdexplains preview vs stable pipelines and safeguards.Reviewed by Cursor Bugbot for commit 28e36b0. Bugbot is set up for automated code reviews on this repo. Configure here.