Skip to content

ci: add publish-stable job with CircleCI OIDC, rename release.yml to legacy fallback - #464

Merged
soniqua merged 2 commits into
ci/IDE-2483_add-stable-release-workflowfrom
ci/IDE-2483_add-publish-stable-job
Sep 29, 2026
Merged

soniqua merged 2 commits into
ci/IDE-2483_add-stable-release-workflowfrom
ci/IDE-2483_add-publish-stable-job

Conversation

@rrama

@rrama rrama commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

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-release workflow scaffold).

⚠️ DO NOT MERGE yet

This must wait until #463 is merged to main. build-sign-stable has already been proven to succeed under a real manual pipeline trigger with no approval gate (verified directly, not just tested on a throwaway branch — see #463's description), so the only remaining gate here is #463 actually merging.

What this adds

  • New publish-stable job: assumes the snyk-assets-eclipse-writer IAM 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 to s3://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.
  • Wires publish-stable into the stable-release workflow ci: add stable-release workflow scaffold on CircleCI OIDC [IDE-2483] #463 added, requiring only build-sign-stable — no separate approval gate (the manual pipeline trigger itself is the deliberate act).
  • DRY refactor: extracts the duplicated "Verify OIDC identity" step (previously copy-pasted in both publish-preview and publish-stable) into a shared commands: verify-oidc-identity: block.
  • Renames .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.
  • Rewrites 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).
  • Adds docs/release.md documenting why the two pipelines (CICD and stable-release) are fully independent — no shared jobs, requires-chain, or workspace.

Context status

publish-stable's context: snyk-eclipse-plugin-github-release now exists (ProdSec created it directly) and has a real GITHUB_TOKEN set. circleci-infra PR #66 formally defines it in Terraform, still blocked on an unrelated state-drift fix in circleci-infra PR #67 — but that's now approved and doesn't block this PR's own testing, since the context already exists on the CircleCI side regardless of Terraform catching up.

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 — see that PR for the full decommissioning runbook.

Checklist

Screenshots / GIFs

N/A — CI config change.

🤖 Generated with Claude Code

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["#464 publish-stable ← YOU ARE HERE\nOIDC publish, DO NOT MERGE yet"]
    PR5["#465 remove legacy workflow\nDO NOT MERGE yet"]
    main --> PR1 --> PR2 --> PR3 --> PR4 --> PR5
    style PR4 fill:#ffd700,color:#000
Loading

Depends on: #463


Note

Medium Risk
Changes production release mechanics (GitHub tagging, S3 stable channel, OIDC role assumption); mitigated by manual trigger gate and idempotent release step, but not yet proven in a real release.

Overview
Adds a manual stable-release path on CircleCI (OIDC to snyk-assets-eclipse-writer): new publish-stable job creates a timestamped GitHub release/tag with the update-site ZIP, uploads the p2 repo to S3 stable, and is wired into the stable-release workflow after build-sign-stable with the snyk-eclipse-plugin-github-release context.

CI hygiene: shared verify-oidc-identity command replaces duplicated OIDC checks in preview publish; build-sign now persists update-site/target/*.zip for release assets; GitHub CLI orb supports gh release create with idempotent skip on retry.

Docs / fallback: RELEASE.md points releases at CircleCI (run_stable_release=true) instead of GHA; new docs/release.md explains preview vs stable pipelines; .github/workflows/release.yml is renamed to Release (Legacy) as a manual fallback until CircleCI is proven.

Reviewed by Cursor Bugbot for commit ffec5ab. Bugbot is set up for automated code reviews on this repo. Configure here.

@rrama rrama added depends-on-463 Depends on PR #463 do-not-merge Not safe to merge yet labels Sep 17, 2026
@snyk-io

snyk-io Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@rrama
rrama marked this pull request as ready for review September 17, 2026 13:44
@rrama
rrama requested a review from a team as a code owner September 17, 2026 13:44
@snyk-pr-review-bot

This comment has been minimized.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d4a9b89. Configure here.

Comment thread .circleci/config.yml Resolved
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>
@snyk-pr-review-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected
📚 Repository Context Analyzed

This review considered 6 relevant code sections from 6 files (average relevance: 0.59)

🤖 Repository instructions applied (from AGENTS.md)

@soniqua
soniqua merged commit 0ab2ada into ci/IDE-2483_add-stable-release-workflow Sep 29, 2026
7 checks passed
@soniqua
soniqua deleted the ci/IDE-2483_add-publish-stable-job branch September 29, 2026 16:43
@rrama
rrama restored the ci/IDE-2483_add-publish-stable-job branch September 30, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

depends-on-463 Depends on PR #463 do-not-merge Not safe to merge yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants