Skip to content

Commit ca52435

Browse files
s
1 parent efade0f commit ca52435

3 files changed

Lines changed: 1 addition & 50 deletions

File tree

.github/workflows/_build-cloud.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
# Internal reusable workflow for building a non-OSS ("cloud") Docker image and
22
# pushing it to Amazon ECR.
3-
#
4-
# Unlike _build.yml (which builds the public, multi-platform OSS image for GHCR),
5-
# this workflow bakes environment-specific configuration into the image — Sentry
6-
# DSNs, the Sentry environment name — and uploads source maps to Sentry. Those
7-
# values come from the GitHub Environment named by `environment`, so a new
8-
# deployment environment is a new Environment plus a small caller workflow.
9-
#
10-
# Each environment publishes to its own ECR repository, `sourcebot-<environment>`,
11-
# owned by CicdStack in the sourcebot-demo-infra repo.
12-
#
13-
# Single-platform (linux/amd64): the EKS `general-purpose` NodePool that runs
14-
# Sourcebot pins `kubernetes.io/arch: amd64`. Building one platform lets us push
15-
# tags directly, skipping the push-by-digest + manifest-merge dance _build.yml
16-
# needs. It also avoids ECR lifecycle rules for untagged images silently deleting
17-
# a manifest list's per-platform children.
18-
193
name: Build Cloud Image
204

215
on:
@@ -42,10 +26,6 @@ on:
4226
jobs:
4327
build:
4428
runs-on: ubuntu-latest
45-
# Gates the job on the Environment's protection rules, and — because the
46-
# OIDC subject for a job with an environment is
47-
# `repo:<org>/<repo>:environment:<name>` — is what the ECR push role's trust
48-
# policy matches on. Also what makes `vars`/`secrets` below resolve.
4929
environment: ${{ inputs.environment }}
5030
permissions:
5131
contents: read
@@ -60,16 +40,10 @@ jobs:
6040
submodules: "true"
6141
fetch-depth: 0
6242

63-
# The exact commit built. `github.sha` is the SHA of the ref the workflow
64-
# was *dispatched* on, which is not necessarily `git_ref`.
6543
- name: Resolve build commit SHA
6644
id: commit
6745
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
6846

69-
# Fail fast, and loudly. The Dockerfile only uploads source maps when every
70-
# Sentry input is non-empty, so a missing var or secret would otherwise
71-
# produce a perfectly green build of an image with no Sentry wiring. Values
72-
# are never printed — only whether each resolved to something.
7347
- name: Validate environment configuration
7448
env:
7549
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

.github/workflows/release-cloud-prod.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
1-
# Builds the production image (app.sourcebot.dev) and pushes it to Amazon ECR.
2-
#
3-
# This is *not* the OSS image: it has the prod Sentry DSNs baked in and uploads
4-
# source maps to Sentry. See _build-cloud.yml.
5-
#
6-
# Publishes to the `sourcebot-prod` ECR repository:
7-
#
8-
# push to main -> :main, :sha-<commit-sha>
9-
# push v*.*.* tag -> :v<x.y.z>, :latest
10-
#
11-
# The `sha-` prefix is load-bearing: CicdStack's lifecycle rule expires old commit
12-
# images by matching that prefix, which is what keeps `main`, `latest` and `v*`
13-
# from ever being expired by count.
14-
#
15-
# Prod deploys from the `:main` tag. The OSS image (ghcr.io/sourcebot-dev/sourcebot)
16-
# is still built independently by release-dev.yml / release-prod.yml.
17-
#
18-
# Note: the Prisma migration backstop is not repeated here — release-dev.yml runs
19-
# `check-prisma-migrations` on the same commit for every push to main.
20-
211
name: Release Sourcebot (Cloud - Production)
222

23-
# The called workflow's permissions are capped by the caller's, and `id-token` is
24-
# never granted by default — without requesting it here, the OIDC token request
25-
# that assumes the ECR push role fails.
263
permissions:
274
contents: read
285
id-token: write

packages/web/next.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export default withSentryConfig(nextConfig, {
147147
org: process.env.SENTRY_ORG,
148148
project: process.env.SENTRY_WEBAPP_PROJECT,
149149
authToken: process.env.SENTRY_AUTH_TOKEN,
150-
release: process.env.SENTRY_RELEASE,
150+
release: { name: process.env.SENTRY_RELEASE },
151151

152152
// Only print logs for uploading source maps in CI
153153
silent: !process.env.CI,

0 commit comments

Comments
 (0)