From 520a56ada0e3126eef76a4e5b8d054c8f3c9808e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Kol=C3=A1=C5=99?= Date: Fri, 17 Nov 2023 23:53:35 +0100 Subject: [PATCH] feat(release): support for proper sentry release propagation VI --- .github/workflows/deploy.yml | 3 ++- Dockerfile | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6249d22b..0743968d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -86,12 +86,12 @@ jobs: labels: ${{ steps.webMeta.outputs.labels }} build-args: | DJANGO_RELEASE_NAME: ${{ steps.meta.outputs.release_name }} - SENTRY_RELEASE_ENVIRONMENT: production secrets: | SENTRY_ORG=${{ secrets.SENTRY_ORG }} SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }} SENTRY_WEBPACK_AUTH_TOKEN=${{ secrets.SENTRY_WEBPACK_AUTH_TOKEN }} SENTRY_RELEASE_NAME=${{ steps.meta.outputs.release_name }} + SENTRY_RELEASE_ENVIRONMENT: production - name: Prepare image metadata id: proxyMeta @@ -131,6 +131,7 @@ jobs: SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }} SENTRY_WEBPACK_AUTH_TOKEN=${{ secrets.SENTRY_WEBPACK_AUTH_TOKEN }} SENTRY_RELEASE_NAME=${{ steps.meta.outputs.release_name }} + SENTRY_RELEASE_ENVIRONMENT: production deploy: name: Deploy to cluster diff --git a/Dockerfile b/Dockerfile index a82ede68..9f389720 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,3 @@ -# expected to be set during production release -ARG SENTRY_RELEASE_ENVIRONMENT -ARG DJANGO_RELASE_NAME - # # webpack image # @@ -41,9 +37,13 @@ RUN \ --mount=type=secret,id=SENTRY_ORG \ --mount=type=secret,id=SENTRY_PROJECT \ --mount=type=secret,id=SENTRY_WEBPACK_AUTH_TOKEN \ + --mount=type=secret,id=SENTRY_RELEASE_NAME \ + --mount=type=secret,id=SENTRY_RELEASE_ENVIRONMENT \ export SENTRY_ORG=$(cat /run/secrets/SENTRY_ORG) \ export SENTRY_PROJECT=$(cat /run/secrets/SENTRY_PROJECT) \ export SENTRY_WEBPACK_AUTH_TOKEN=$(cat /run/secrets/SENTRY_WEBPACK_AUTH_TOKEN) \ + export SENTRY_RELEASE_NAME=$(cat /run/secrets/SENTRY_RELEASE_NAME) \ + export SENTRY_RELEASE_ENVIRONMENT=$(cat /run/secrets/SENTRY_RELEASE_ENVIRONMENT) \ && yarn build #