debian-image-builder-frontend/ci.sh
Sanne Raymaekers 3addcf66f4 ci.sh: inject debug ids using sentry-cli
Since we're building with konflux now, we lost the debug ids. By
injecting the debug ids in konflux we regain unminified sourcemaps in
sentry. Note that jenkins will continue to upload the sourcemaps, which
are tied to specific releases, we just need the debug ids to be in the
production artefacts.
2024-12-10 09:16:25 +01:00

35 lines
949 B
Bash

#!/bin/bash
# Workaround needed for Konflux pipeline to pass
find -name "cockpit" -type d
find -name "cockpit" -type d | xargs rm -rf -
setNpmOrYarn
install
build
if [ "$IS_PR" == true ]; then
verify
else
export BETA=false
build
npm run sentry:inject
source build_app_info.sh
mv ${DIST_FOLDER} stable
export BETA=true
# Export sentry specific variables for the webpack plugin. Note that
# this only works in jenkins (not konflux). The webpack plugin will
# both inject debug ids and upload the sourcemaps, in konflux only
# the debug ids are injected. As the debug ids are consistend
# across builds, this works.
export SENTRY_AUTH_TOKEN SENTRY_DSN SENTRY_ORG SENTRY_PROJECT
build
npm run sentry:inject
source build_app_info.sh
mv ${DIST_FOLDER} preview
mkdir -p ${DIST_FOLDER}
mv stable ${DIST_FOLDER}/stable
mv preview ${DIST_FOLDER}/preview
fi
# End workaround