ref(analytics): Transform analytics events for TET-837 #110526
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: self-hosted | |
on: | |
push: | |
branches: | |
- master | |
- releases/** | |
pull_request: | |
# Cancel in progress workflows on pull_requests. | |
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
# hack for https://github.com/actions/cache/issues/810#issuecomment-1222550359 | |
env: | |
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 | |
NODE_OPTIONS: '--max-old-space-size=4096' | |
jobs: | |
self-hosted: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-24.04 | |
platform: amd64 | |
- os: ubuntu-24.04-arm | |
platform: arm64 | |
name: self-hosted-${{ matrix.os }}-${{ matrix.platform }} | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 | |
id: setup-node | |
with: | |
node-version-file: '.node-version' | |
- uses: pnpm/action-setup@36de12bed180fa130ed56a35e7344f2fa7a820ab # v4 | |
- uses: astral-sh/setup-uv@884ad927a57e558e7a70b92f2bccf9198a4be546 # v6 | |
with: | |
version: '0.8.2' | |
- uses: getsentry/action-setup-venv@3a832a9604b3e1a4202ae559248f26867b467cc7 # v2.1.1 | |
with: | |
python-version: 3.13.1 | |
cache-dependency-path: uv.lock | |
# sentry.build.main has no external dependencies; | |
# this is only to set up the venv with the correct | |
# python version | |
install-cmd: echo | |
- name: Step configurations | |
id: config | |
run: | | |
echo "webpack-path=.webpack_cache" >> "$GITHUB_OUTPUT" | |
echo "WEBPACK_CACHE_PATH=.webpack_cache" >> "$GITHUB_ENV" | |
- name: webpack cache | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
with: | |
path: ${{ steps.config.outputs.webpack-path }} | |
key: ${{ runner.os }}-self-hosted-webpack-cache-${{ hashFiles('webpack.config.ts') }} | |
- name: node_modules cache | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
id: nodemodulescache | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-self-hosted-node-modules-${{ hashFiles('pnpm-lock.yaml', '.node-version') }} | |
- name: Install Javascript Dependencies | |
if: steps.nodemodulescache.outputs.cache-hit != 'true' | |
run: pnpm install --frozen-lockfile --production | |
- run: | | |
python3 -m tools.fast_editable --path . | |
python3 -m sentry.build.main | |
- uses: getsentry/action-build-and-push-images@07a1c835f7a78e0f438fc766cc6024ed0ca1bf03 | |
with: | |
image_name: 'sentry' | |
platforms: linux/${{ matrix.platform }} | |
dockerfile_path: 'self-hosted/Dockerfile' | |
tag_suffix: -${{ matrix.platform }} | |
build_args: | | |
SOURCE_COMMIT=${{ github.sha }} | |
TARGETARCH=${{ matrix.platform }} | |
ghcr: true | |
tag_nightly: false | |
tag_latest: false | |
assemble: | |
needs: [self-hosted] | |
if: ${{ (github.ref_name == 'master' || startsWith(github.ref_name, 'releases/')) && github.event_name != 'pull_request' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Docker Login | |
run: docker login --username '${{ github.actor }}' --password-stdin ghcr.io <<< "$GHCR_TOKEN" | |
env: | |
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 | |
- name: Create multiplatform manifests | |
run: | | |
docker buildx imagetools create \ | |
--tag ghcr.io/getsentry/sentry:${{ github.sha }} \ | |
--tag ghcr.io/getsentry/sentry:nightly \ | |
--tag ghcr.io/getsentry/sentry:latest \ | |
ghcr.io/getsentry/sentry:${{ github.sha }}-amd64 \ | |
ghcr.io/getsentry/sentry:${{ github.sha }}-arm64 |