build(gha): Add automated CalVer releases (#539)
This commit is contained in:
parent
cfaa368306
commit
2fc9811c74
@ -2,6 +2,7 @@ minVersion: "0.10.0"
|
||||
github:
|
||||
owner: getsentry
|
||||
repo: onpremise
|
||||
releaseBranchPrefix: releases
|
||||
changelogPolicy: none
|
||||
artifactProvider:
|
||||
name: none
|
||||
|
1
.env
1
.env
@ -1,3 +1,4 @@
|
||||
COMPOSE_PROJECT_NAME=sentry_onpremise
|
||||
SENTRY_EVENT_RETENTION_DAYS=90
|
||||
SENTRY_VERSION=latest
|
||||
SYMBOLICATOR_VERSION=latest
|
||||
|
23
.github/workflows/release.yml
vendored
23
.github/workflows/release.yml
vendored
@ -1,14 +1,31 @@
|
||||
on:
|
||||
repository_dispatch:
|
||||
types: [release]
|
||||
schedule:
|
||||
# We want the release to be at 10 or 11am Pacific Time
|
||||
# We also make this an hour after all others such as Sentry,
|
||||
# Snuba, and Relay to make sure their releases finish.
|
||||
- cron: '0 18 15 * *'
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
name: "Release a new version"
|
||||
steps:
|
||||
- id: calver
|
||||
if: ${{ !github.event.client_payload.version }}
|
||||
run: echo "::set-output name=version::$(date +'%y.%-m.0')"
|
||||
- uses: actions/checkout@v2
|
||||
- uses: getsentry/craft-action@master
|
||||
- uses: getsentry/craft@master
|
||||
with:
|
||||
action: prepare
|
||||
version: ${{ github.event.client_payload.version }}
|
||||
dry_run: ${{ github.event.client_payload.dry_run }}
|
||||
version: ${{ github.event.client_payload.version || steps.calver.outputs.version }}
|
||||
env:
|
||||
DRY_RUN: ${{ github.event.client_payload.dry_run }}
|
||||
- uses: getsentry/craft@master
|
||||
with:
|
||||
action: publish
|
||||
version: ${{ github.event.client_payload.version || steps.calver.outputs.version }}
|
||||
keep_branch: true
|
||||
no_merge: true
|
||||
env:
|
||||
DRY_RUN: ${{ github.event.client_payload.dry_run }}
|
||||
|
@ -133,7 +133,7 @@ services:
|
||||
command: '"*/5 * * * * gosu snuba snuba cleanup --dry-run False"'
|
||||
symbolicator:
|
||||
<< : *restart_policy
|
||||
image: 'getsentry/symbolicator:latest'
|
||||
image: 'getsentry/symbolicator:$SYMBOLICATOR_VERSION'
|
||||
volumes:
|
||||
- 'sentry-symbolicator:/data'
|
||||
command: run
|
||||
@ -143,7 +143,7 @@ services:
|
||||
build:
|
||||
context: ./cron
|
||||
args:
|
||||
BASE_IMAGE: 'getsentry/symbolicator:latest'
|
||||
BASE_IMAGE: 'getsentry/symbolicator:$SYMBOLICATOR_VERSION'
|
||||
command: '"55 23 * * * gosu symbolicator symbolicator cleanup"'
|
||||
volumes:
|
||||
- 'sentry-symbolicator:/data'
|
||||
@ -174,7 +174,7 @@ services:
|
||||
<< : *restart_policy
|
||||
ports:
|
||||
- '9000:80/tcp'
|
||||
image: "nginx:1.16"
|
||||
image: 'nginx:1.16'
|
||||
volumes:
|
||||
- type: bind
|
||||
read_only: true
|
||||
@ -185,7 +185,7 @@ services:
|
||||
- relay
|
||||
relay:
|
||||
<< : *restart_policy
|
||||
image: "getsentry/relay:$SENTRY_VERSION"
|
||||
image: 'getsentry/relay:$SENTRY_VERSION'
|
||||
volumes:
|
||||
- type: bind
|
||||
read_only: true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
set -eu
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd $SCRIPT_DIR/..
|
||||
@ -7,5 +7,11 @@ cd $SCRIPT_DIR/..
|
||||
OLD_VERSION="$1"
|
||||
NEW_VERSION="$2"
|
||||
|
||||
VERSION=$2
|
||||
echo "New version: $VERSION"
|
||||
SYMBOLICATOR_VERSION=$(curl -sSL 'https://api.github.com/repos/getsentry/symbolicator/git/refs/heads/master' | grep -Po '(?<=\"sha\": \")([a-f0-9]{5,40})(?=\",?)')
|
||||
|
||||
sed -i -e "s/^SYMBOLICATOR_VERSION=.*\$/SYMBOLICATOR_VERSION=$SYMBOLICATOR_VERSION/" .env
|
||||
sed -i -e "s/^SENTRY_VERSION=.*\$/SENTRY_VERSION=$NEW_VERSION/" .env
|
||||
sed -i -e "s/^\# Sentry .* On-Premise/# Sentry $NEW_VERSION On-Premise/" README.md
|
||||
|
||||
echo "New version: $NEW_VERSION"
|
||||
echo "New Symbolicator version: $SYMBOLICATOR_VERSION"
|
||||
|
Reference in New Issue
Block a user