Skip to content

Add PR preview workflow (GitHub Actions + ArgoCD) - #484

Open
satyamz wants to merge 1 commit into
stellar:masterfrom
satyamz:add-pr-preview-workflow
Open

Add PR preview workflow (GitHub Actions + ArgoCD)#484
satyamz wants to merge 1 commit into
stellar:masterfrom
satyamz:add-pr-preview-workflow

Conversation

@satyamz

@satyamz satyamz commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Migrates this repo's per-PR preview environments from the Jenkins preview pipeline (stellar/pipelines) to GitHub Actions + ArgoCD.

How it works

  • On every PR event (opened / synchronize / reopened / closed) the workflow runs the sdf-pr-preview composite actions: gate (withdraws the preview label, checks org membership) -> build & push the preview image(s) to dev ECR -> publish (verifies the images exist, restores the label, comments the preview URL).
  • ArgoCD ApplicationSet(s) preview-account-viewer-v2 in stellar/kube watch PRs carrying the preview label and deploy one charts/pr-previews release per PR. Closing the PR tears the preview down.
  • Images are tagged pr-<number>-<head-sha>: dev/account-viewer-v2

Preview URL(s)

  • https://account-viewer-v2-pr-<number>.previews.kube001.services.stellar-ops.com

Security

The workflow runs on pull_request_target (required for fork PRs to get OIDC + label/comment permissions). Per the sdf-pr-preview caller contract: the gate runs before any PR code is checked out, and every later step is guarded by steps.gate.outputs.member == 'true', so non-member PRs never build.

Before merging

  • preview label exists in this repo
  • PREVIEW_BOT_APP_ID repo variable and PREVIEW_BOT_PRIVATE_KEY secret are set
  • This repo can assume the dev ECR push role via OIDC (sdf-ecr-login)
  • The matching ApplicationSet + values in stellar/kube are merged

🤖 Generated with Claude Code

Replaces the Jenkins preview pipeline (stellar/pipelines) with the
gate -> build -> publish flow from stellar/actions/sdf-pr-preview.
ArgoCD ApplicationSets in stellar/kube deploy a preview per PR
carrying the 'preview' label and tear it down on close.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings August 28, 2026 15:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds automated per-PR preview image publishing for ArgoCD deployments.

Changes:

  • Gates preview builds by organization membership.
  • Builds and pushes SHA-tagged images to dev ECR.
  • Publishes preview labels and URLs after image verification.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@stellar-jenkins-ci

Copy link
Copy Markdown

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.

4 participants