mirror of
https://github.com/BillyOutlast/posthog.git
synced 2026-02-04 03:01:23 +01:00
feat: process our source maps (#40213)
This commit is contained in:
committed by
GitHub
parent
eedd51b7b1
commit
b1aa0c1dba
@@ -66,3 +66,6 @@ rust/target
|
||||
!docker-compose.base.yml
|
||||
!docker-compose.dev.yml
|
||||
!docker
|
||||
!.git/config
|
||||
!.git/HEAD
|
||||
!.git/refs
|
||||
|
||||
6
.github/workflows/container-images-cd.yml
vendored
6
.github/workflows/container-images-cd.yml
vendored
@@ -76,7 +76,11 @@ jobs:
|
||||
push: true
|
||||
tags: ghcr.io/posthog/posthog:latest,ghcr.io/posthog/posthog:${{ github.sha }},posthog/posthog:${{ github.sha }},posthog/posthog:latest,${{ steps.aws-ecr.outputs.registry }}/posthog-cloud:master,${{ steps.aws-ecr.outputs.registry }}/posthog-cloud:${{ github.sha }}
|
||||
platforms: linux/arm64,linux/amd64
|
||||
build-args: COMMIT_HASH=${{ github.sha }}
|
||||
build-args: |
|
||||
COMMIT_HASH=${{ github.sha }}
|
||||
BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
|
||||
secrets: |
|
||||
posthog_upload_sourcemaps_cli_api_key=${{ secrets.POSTHOG_UPLOAD_SOURCEMAPS_CLI_API_KEY }}
|
||||
|
||||
- name: report failure
|
||||
if: failure()
|
||||
|
||||
15
Dockerfile
15
Dockerfile
@@ -35,6 +35,9 @@ COPY common/esbuilder/ common/esbuilder/
|
||||
COPY common/tailwind/ common/tailwind/
|
||||
COPY products/ products/
|
||||
COPY ee/frontend/ ee/frontend/
|
||||
COPY .git/config .git/config
|
||||
COPY .git/HEAD .git/HEAD
|
||||
COPY .git/refs/heads .git/refs/heads
|
||||
RUN --mount=type=cache,id=pnpm,target=/tmp/pnpm-store-v23 \
|
||||
corepack enable && pnpm --version && \
|
||||
pnpm --filter=@posthog/frontend... install --frozen-lockfile --store-dir /tmp/pnpm-store-v23
|
||||
@@ -42,6 +45,18 @@ RUN --mount=type=cache,id=pnpm,target=/tmp/pnpm-store-v23 \
|
||||
COPY frontend/ frontend/
|
||||
RUN bin/turbo --filter=@posthog/frontend build
|
||||
|
||||
# Process sourcemaps using posthog-cli
|
||||
RUN --mount=type=secret,id=posthog_upload_sourcemaps_cli_api_key \
|
||||
if [ -f /run/secrets/posthog_upload_sourccemaps_cli_api_key ]; then \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends ca-certificates curl && \
|
||||
curl --proto '=https' --tlsv1.2 -LsSf https://download.posthog.com/cli | sh && \
|
||||
export PATH="/root/.posthog:$PATH" && \
|
||||
export POSTHOG_CLI_TOKEN="$(cat /run/secrets/posthog_upload_sourcemaps_cli_api_key)" && \
|
||||
export POSTHOG_CLI_ENV_ID=2 && \
|
||||
posthog-cli sourcemap process --directory /code/frontend/dist --public-path-prefix /static --no-fail; \
|
||||
fi
|
||||
|
||||
#
|
||||
# ---------------------------------------------------------
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user