Skip to content

Commit

Permalink
Do not send sourcemap to sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed Jul 12, 2023
1 parent 86b5227 commit a8de71a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
name: Set application version and env profile
runs-on: ubuntu-22.04
outputs:
IS_RELEASE: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v1') || startsWith(github.ref, 'refs/heads/v1') || startsWith(github.ref, 'refs/tags/v2') || startsWith(github.ref, 'refs/heads/v2')
ENV_PROFILE: ${{ steps.env_profile.outputs.ENV_PROFILE }}
VERSION: ${{ steps.version.outputs.VERSION }}
steps:
Expand Down Expand Up @@ -122,6 +123,7 @@ jobs:
needs: version
runs-on: ubuntu-22.04
env:
IS_RELEASE: ${{ needs.version.outputs.IS_RELEASE }}
ENV_PROFILE: ${{needs.version.outputs.ENV_PROFILE}}
VERSION: ${{needs.version.outputs.VERSION}}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
Expand Down Expand Up @@ -156,6 +158,7 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache-app
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-app-new
build-args: |
IS_RELEASE=${{ env.IS_RELEASE }}
VERSION=${{ env.VERSION }}
ENV_PROFILE=${{ env.ENV_PROFILE }}
GITHUB_SHA=${{ github.sha }}
Expand Down Expand Up @@ -253,9 +256,11 @@ jobs:
needs: [version, e2e_test]
runs-on: ubuntu-22.04
env:
IS_RELEASE: ${{ needs.version.outputs.IS_RELEASE }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
ENV_PROFILE: ${{needs.version.outputs.ENV_PROFILE}}
VERSION: ${{needs.version.outputs.VERSION}}
if: ${{ env.IS_RELEASE }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -266,7 +271,6 @@ jobs:
image: monitorfish-app:${{ env.VERSION }}

- name: Push docker image to registry
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v1') || startsWith(github.ref, 'refs/heads/v1') || startsWith(github.ref, 'refs/tags/v2') || startsWith(github.ref, 'refs/heads/v2')
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${GITHUB_ACTOR} --password-stdin
make docker-tag
Expand Down
1 change: 1 addition & 0 deletions frontend/cypress/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ services:
- REACT_APP_GEOSERVER_REMOTE_URL=http://0.0.0.0:8081
- REACT_APP_CYPRESS_TEST=true
- REACT_APP_IS_DEV_ENV=true
- SENTRY_DSN=
- MONITORENV_URL=http://geoserver-monitorenv-stubs:8080
- MONITORFISH_API_PROTECTED_API_KEY=APIKEY
ports:
Expand Down
6 changes: 4 additions & 2 deletions infra/docker/DockerfileBuildApp
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ COPY --from=buildFront /tmp/frontend/build /tmp/frontend/build

# Upload sourcemaps to sentry
RUN sentry-cli sourcemaps inject /tmp/frontend
RUN sentry-cli \
RUN if [ "IS_RELEASE" = true ]; then sentry-cli \
--url ${SENTRY_URL} \
--auth-token ${SENTRY_AUTH_TOKEN} \
sourcemaps upload /tmp/frontend \
--release ${VERSION} \
--org ${SENTRY_ORG} \
--project ${SENTRY_PROJECT}
--project ${SENTRY_PROJECT} ; \
else echo "Not sending sourcemap to sentry" ; \
fi

######################
# Create final image #
Expand Down

0 comments on commit a8de71a

Please sign in to comment.