mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
chore(mobile): lighter-weight release process (#2144)
Signed-off-by: npub1sv749mw8zcmld4ygjx2mx2aqcn3zvtuj2nlmgatxgad3t9uweu9q5marze <833d52edc71637f6d4889195b32ba0c4e2262f9254ffb47566475b15978ecf0a@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1ux8n2yfs8qfvgd75s7kyhar2mztac355v6vmrz4juc9l3msw4pgstums9e <e18f3511303812c437d487ac4bf46ad897dc46946699b18ab2e60bf8ee0ea851@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1re830n24qhgstulznk5dxdluccspxkxxdq643lm4q3zwwwjgsuqqmcmdrm <1e4f17cd5505d105f3e29da8d337fcc6201358c6683558ff750444e73a488700@buzz.block.builderlab.xyz> Signed-off-by: npub102wg7q285p64ch2fjvstmf2ntn2sz3c4u5hmwatalc76mhsuauysftjtfj <7a9c8f0147a0755c5d499320bda5535cd5014715e52fb7757dfe3dadde1cef09@buzz.block.builderlab.xyz> Co-authored-by: npub1sv749mw8zcmld4ygjx2mx2aqcn3zvtuj2nlmgatxgad3t9uweu9q5marze <833d52edc71637f6d4889195b32ba0c4e2262f9254ffb47566475b15978ecf0a@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub1ux8n2yfs8qfvgd75s7kyhar2mztac355v6vmrz4juc9l3msw4pgstums9e <e18f3511303812c437d487ac4bf46ad897dc46946699b18ab2e60bf8ee0ea851@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub1re830n24qhgstulznk5dxdluccspxkxxdq643lm4q3zwwwjgsuqqmcmdrm <1e4f17cd5505d105f3e29da8d337fcc6201358c6683558ff750444e73a488700@buzz.block.builderlab.xyz> Co-authored-by: 7a9c8f0147a0755c5d499320bda5535cd5014715e52fb7757dfe3dadde1cef09@buzz.block.builderlab.xyz <7a9c8f0147a0755c5d499320bda5535cd5014715e52fb7757dfe3dadde1cef09@buzz.block.builderlab.xyz>
This commit is contained in:
co-authored by
npub1sv749mw8zcmld4ygjx2mx2aqcn3zvtuj2nlmgatxgad3t9uweu9q5marze
npub1ux8n2yfs8qfvgd75s7kyhar2mztac355v6vmrz4juc9l3msw4pgstums9e
npub1re830n24qhgstulznk5dxdluccspxkxxdq643lm4q3zwwwjgsuqqmcmdrm
7a9c8f0147a0755c5d499320bda5535cd5014715e52fb7757dfe3dadde1cef09@buzz.block.builderlab.xyz <7a9c8f0147a0755c5d499320bda5535cd5014715e52fb7757dfe3dadde1cef09@buzz.block.builderlab.xyz>
parent
e67303f603
commit
21573b6cb9
@@ -1,6 +1,6 @@
|
||||
name: Auto-tag on Release PR Merge
|
||||
|
||||
# Five release lanes share this one workflow. Four use an explicit branch
|
||||
# Four PR-driven release lanes share this workflow. Each uses an explicit branch
|
||||
# prefix; the main chart lane also auto-detects a Chart.yaml version bump so
|
||||
# a chart feature PR can publish its own new version when merged:
|
||||
#
|
||||
@@ -10,18 +10,20 @@ name: Auto-tag on Release PR Merge
|
||||
# push-chart-release/<v> → tag push-chart-v<v> → push-gateway-helm-chart.yml
|
||||
# any internal PR that bumps deploy/charts/buzz/Chart.yaml `version`
|
||||
# → tag chart-v<v> → helm-chart.yml (helm chart)
|
||||
# mobile-release/<v> → tag mobile-v<v> → (manual sprout_ref for buzz-releases build — see below)
|
||||
#
|
||||
# Mobile candidate tags do not come from merged PRs. Operators create immutable
|
||||
# mobile-v<v>-rc.N tags directly from remote main with scripts/mobile-release.sh,
|
||||
# then hand the exact tag to buzz-releases.
|
||||
#
|
||||
# Release tags are created with a short-lived token from the dedicated
|
||||
# buzz-release-bot GitHub App. GitHub attributes the ref creation to that
|
||||
# App, so the consumer's `on.push.tags` trigger runs normally. The workflow's
|
||||
# default GITHUB_TOKEN remains read-only and is never used to create a tag.
|
||||
#
|
||||
# The mobile lane is push-only by infosec necessity: OSS `block/buzz` CI must
|
||||
# not trigger CI in the private `buzz-releases` repo, so auto-dispatch across
|
||||
# that boundary is deliberately disallowed. The mobile-v* tag is consumed
|
||||
# manually instead — a human feeds it as the `sprout_ref` input to the
|
||||
# `buzz-releases` Buildkite pipeline, which builds and ships mobile.
|
||||
# Mobile is manual-only by infosec necessity: OSS `block/buzz` CI must
|
||||
# not trigger CI in the private `buzz-releases` repo. A human feeds the exact
|
||||
# mobile candidate tag to the private Buildkite pipeline, which builds and
|
||||
# ships mobile.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -65,9 +67,6 @@ jobs:
|
||||
push-chart-release/*)
|
||||
VERSION="${BRANCH#push-chart-release/}"
|
||||
TAG_PREFIX="push-chart-v" ;;
|
||||
mobile-release/*)
|
||||
VERSION="${BRANCH#mobile-release/}"
|
||||
TAG_PREFIX="mobile-v" ;;
|
||||
*)
|
||||
parent_sha="$(git rev-parse HEAD^)"
|
||||
old_version="$(git show "${parent_sha}:deploy/charts/buzz/Chart.yaml" 2>/dev/null | awk '/^version:/ {print $2}')"
|
||||
|
||||
@@ -58,9 +58,19 @@ jobs:
|
||||
- 'pnpm-lock.yaml'
|
||||
mobile:
|
||||
- 'mobile/**'
|
||||
- 'scripts/mobile-release.sh'
|
||||
- 'scripts/publish-mobile-release-candidate.sh'
|
||||
- 'scripts/release-rulesets.sh'
|
||||
- 'scripts/test-mobile-release-contract.sh'
|
||||
- 'scripts/test-mobile-release-candidate-publisher.sh'
|
||||
- '.github/workflows/mobile-release-candidate.yml'
|
||||
- '.github/workflows/ci.yml'
|
||||
- name: Release workflow source contract
|
||||
run: scripts/test-release-ref-contract.sh
|
||||
- name: Mobile release contract
|
||||
run: |
|
||||
scripts/test-mobile-release-contract.sh
|
||||
scripts/test-mobile-release-candidate-publisher.sh
|
||||
|
||||
rust-lint:
|
||||
name: Rust Lint
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
name: Publish Mobile Release Candidate
|
||||
run-name: Publish mobile-v${{ inputs.version }}-rc.${{ inputs.candidate_number }}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Mobile marketing version (X.Y.Z)
|
||||
required: true
|
||||
type: string
|
||||
candidate_number:
|
||||
description: Expected next release-candidate number
|
||||
required: true
|
||||
type: string
|
||||
target_sha:
|
||||
description: Exact current block/buzz main commit
|
||||
required: true
|
||||
type: string
|
||||
|
||||
concurrency:
|
||||
group: mobile-release-candidate-${{ inputs.version }}
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Require the reviewed workflow from main
|
||||
env:
|
||||
DISPATCH_REF: ${{ github.ref }}
|
||||
run: |
|
||||
if [ "$DISPATCH_REF" != "refs/heads/main" ]; then
|
||||
echo "::error::Mobile candidates must be dispatched from main, not $DISPATCH_REF"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Require canonical repository
|
||||
env:
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
run: |
|
||||
if [ "$REPOSITORY" != "block/buzz" ]; then
|
||||
echo "::error::Mobile candidate publication is restricted to block/buzz"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Create release tagger token
|
||||
id: release-tagger
|
||||
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
with:
|
||||
client-id: ${{ vars.BUZZ_RELEASE_TAGGER_CLIENT_ID }}
|
||||
private-key: ${{ secrets.BUZZ_RELEASE_TAGGER_PRIVATE_KEY }}
|
||||
permission-contents: write
|
||||
|
||||
- name: Publish annotated candidate tag
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.release-tagger.outputs.token }}
|
||||
MOBILE_VERSION: ${{ inputs.version }}
|
||||
CANDIDATE_NUMBER: ${{ inputs.candidate_number }}
|
||||
TARGET_SHA: ${{ inputs.target_sha }}
|
||||
run: scripts/publish-mobile-release-candidate.sh "$MOBILE_VERSION" "$CANDIDATE_NUMBER" "$TARGET_SHA"
|
||||
Reference in New Issue
Block a user