Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry source maps #2878

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions .github/workflows/test-and-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
working-directory: ./client
steps:
- uses: actions/checkout@v3
- name: Set up node ${{ matrix.node-version }}
- name: Set up node LTS
uses: actions/setup-node@v3
with:
node-version: "18.17.1"
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
working-directory: ./server
steps:
- uses: actions/checkout@v3
- name: Set up node ${{ matrix.node-version }}
- name: Set up node LTS
uses: actions/setup-node@v3
with:
node-version: "18.17.1"
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
working-directory: ./tests
steps:
- uses: actions/checkout@v3
- name: Set up node ${{ matrix.node-version }}
- name: Set up node LTS
uses: actions/setup-node@v3
with:
node-version: "18.17.1"
Expand Down Expand Up @@ -152,3 +152,31 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.RENKUBOT_GITHUB_TOKEN }}
COMPONENT_NAME: renku-ui

# upload-source-maps:
# needs: [publish-images]
# runs-on: ubuntu-22.04
# if: "startsWith(github.ref, 'refs/tags/')"
# defaults:
# run:
# working-directory: ./client
# steps:
# - uses: actions/checkout@v3
# - name: Set up node LTS
# uses: actions/setup-node@v3
# with:
# node-version: "18.17.1"
# - name: Install client dependencies
# run: npm clean-install
# env:
# NODE_OPTIONS: "--max-old-space-size=4096"
# - name: Set up environment variables
# run: echo "CHART_TAG=$(echo "${GITHUB_REF}" | cut -d/ -f3)" >> $GITHUB_ENV
# - name: Pull Docker image
# run: docker pull renku/renku-ui:$CHART_TAG
# - name: Create container
# run: docker create --name renku-ui-container renku/renku-ui:$CHART_TAG
# - name: Pull out build files
# run: docker cp renku-ui-container:/usr/share/nginx/html ./build
# - name: Send build files to Sentry
# run: npx sentry-cli sourcemaps upload --release=$CHART_TAG ./build
7 changes: 2 additions & 5 deletions client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ ENV NODE_OPTIONS="--max-old-space-size=4096"
ARG SHORT_SHA
ENV RENKU_UI_SHORT_SHA=$SHORT_SHA

# Delete this after reactstrap is released
RUN apk update && apk upgrade && \
apk add --no-cache git

# There is some incompatibility between craco and react-scripts >4
# that causes problems with linting. Lint errors should have been
# caught before we get here, so we can turn this off.
# But look into https://github.com/gsoft-inc/craco/pull/219 for a better fix
ENV DISABLE_ESLINT_PLUGIN=true
RUN npm ci && \
npm run-script build
npm run-script build && \
npm run-script build:sentry

COPY .storybook /app/.storybook

Expand Down
60 changes: 60 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"start": "react-scripts start",
"build": "REACT_APP_UI_DEV_MODE=false craco --max_old_space_size=4096 build",
"build:analyze": "REACT_APP_UI_DEV_MODE=false craco --max_old_space_size=4096 build --analyze",
"build:sentry": "sentry-cli sourcemaps inject build",
"test": "craco test",
"eject": "craco eject",
"lint": "eslint --max-warnings=0 src/",
Expand All @@ -102,6 +103,7 @@
"@babel/preset-typescript": "^7.16.7",
"@craco/craco": "^7.0.0",
"@rtk-query/codegen-openapi": "^1.0.0",
"@sentry/cli": "^2.21.2",
"@storybook/addon-actions": "~7.2.0",
"@storybook/addon-essentials": "~7.2.0",
"@storybook/addon-interactions": "~7.2.0",
Expand Down
Loading