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.
This commit is contained in:
Sanne Raymaekers 2024-12-09 17:37:51 +01:00 committed by Klara Simickova
parent e90a4fc9b3
commit 3addcf66f4
4 changed files with 45 additions and 41 deletions

3
.gitignore vendored
View file

@ -33,3 +33,6 @@ deps.png
cockpit/public/vendor*
cockpit/public/src_*
cockpit/public/main*
# Sentry Config File
.sentryclirc

8
ci.sh
View file

@ -13,12 +13,18 @@ if [ "$IS_PR" == true ]; then
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
# 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}

71
package-lock.json generated
View file

@ -18,6 +18,7 @@
"@redhat-cloud-services/frontend-components-utilities": "4.0.19",
"@reduxjs/toolkit": "2.3.0",
"@scalprum/react-core": "0.9.3",
"@sentry/cli": "2.39.1",
"@sentry/webpack-plugin": "2.22.6",
"@unleash/proxy-client-react": "4.3.1",
"classnames": "2.5.1",
@ -4599,11 +4600,10 @@
}
},
"node_modules/@sentry/cli": {
"version": "2.38.2",
"resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.38.2.tgz",
"integrity": "sha512-CR0oujpAnhegK2pBAv6ZReMqbFTuNJLDZLvoD1B+syrKZX+R+oxkgT2e1htsBbht+wGxAsluVWsIAydSws1GAA==",
"version": "2.39.1",
"resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.39.1.tgz",
"integrity": "sha512-JIb3e9vh0+OmQ0KxmexMXg9oZsR/G7HMwxt5BUIKAXZ9m17Xll4ETXTRnRUBT3sf7EpNGAmlQk1xEmVN9pYZYQ==",
"hasInstallScript": true,
"license": "BSD-3-Clause",
"dependencies": {
"https-proxy-agent": "^5.0.0",
"node-fetch": "^2.6.7",
@ -4618,20 +4618,19 @@
"node": ">= 10"
},
"optionalDependencies": {
"@sentry/cli-darwin": "2.38.2",
"@sentry/cli-linux-arm": "2.38.2",
"@sentry/cli-linux-arm64": "2.38.2",
"@sentry/cli-linux-i686": "2.38.2",
"@sentry/cli-linux-x64": "2.38.2",
"@sentry/cli-win32-i686": "2.38.2",
"@sentry/cli-win32-x64": "2.38.2"
"@sentry/cli-darwin": "2.39.1",
"@sentry/cli-linux-arm": "2.39.1",
"@sentry/cli-linux-arm64": "2.39.1",
"@sentry/cli-linux-i686": "2.39.1",
"@sentry/cli-linux-x64": "2.39.1",
"@sentry/cli-win32-i686": "2.39.1",
"@sentry/cli-win32-x64": "2.39.1"
}
},
"node_modules/@sentry/cli-darwin": {
"version": "2.38.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-darwin/-/cli-darwin-2.38.2.tgz",
"integrity": "sha512-21ywIcJCCFrCTyiF1o1PaT7rbelFC2fWmayKYgFElnQ55IzNYkcn8BYhbh/QknE0l1NBRaeWMXwTTdeoqETCCg==",
"license": "BSD-3-Clause",
"version": "2.39.1",
"resolved": "https://registry.npmjs.org/@sentry/cli-darwin/-/cli-darwin-2.39.1.tgz",
"integrity": "sha512-kiNGNSAkg46LNGatfNH5tfsmI/kCAaPA62KQuFZloZiemTNzhy9/6NJP8HZ/GxGs8GDMxic6wNrV9CkVEgFLJQ==",
"optional": true,
"os": [
"darwin"
@ -4641,13 +4640,12 @@
}
},
"node_modules/@sentry/cli-linux-arm": {
"version": "2.38.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm/-/cli-linux-arm-2.38.2.tgz",
"integrity": "sha512-+AiKDBQKIdQe4NhBiHSHGl0KR+b//HHTrnfK1SaTrOm9HtM4ELXAkjkRF3bmbpSzSQCS5WzcbIxxCJOeaUaO0A==",
"version": "2.39.1",
"resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm/-/cli-linux-arm-2.39.1.tgz",
"integrity": "sha512-DkENbxyRxUrfLnJLXTA4s5UL/GoctU5Cm4ER1eB7XN7p9WsamFJd/yf2KpltkjEyiTuplv0yAbdjl1KX3vKmEQ==",
"cpu": [
"arm"
],
"license": "BSD-3-Clause",
"optional": true,
"os": [
"linux",
@ -4658,13 +4656,12 @@
}
},
"node_modules/@sentry/cli-linux-arm64": {
"version": "2.38.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.38.2.tgz",
"integrity": "sha512-4Fp/jjQpNZj4Th+ZckMQvldAuuP0ZcyJ9tJCP1CCOn5poIKPYtY6zcbTP036R7Te14PS4ALOcDNX3VNKfpsifA==",
"version": "2.39.1",
"resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.39.1.tgz",
"integrity": "sha512-5VbVJDatolDrWOgaffsEM7znjs0cR8bHt9Bq0mStM3tBolgAeSDHE89NgHggfZR+DJ2VWOy4vgCwkObrUD6NQw==",
"cpu": [
"arm64"
],
"license": "BSD-3-Clause",
"optional": true,
"os": [
"linux",
@ -4675,14 +4672,13 @@
}
},
"node_modules/@sentry/cli-linux-i686": {
"version": "2.38.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-linux-i686/-/cli-linux-i686-2.38.2.tgz",
"integrity": "sha512-6zVJN10dHIn4R1v+fxuzlblzVBhIVwsaN/S7aBED6Vn1HhAyAcNG2tIzeCLGeDfieYjXlE2sCI82sZkQBCbAGw==",
"version": "2.39.1",
"resolved": "https://registry.npmjs.org/@sentry/cli-linux-i686/-/cli-linux-i686-2.39.1.tgz",
"integrity": "sha512-pXWVoKXCRrY7N8vc9H7mETiV9ZCz+zSnX65JQCzZxgYrayQPJTc+NPRnZTdYdk5RlAupXaFicBI2GwOCRqVRkg==",
"cpu": [
"x86",
"ia32"
],
"license": "BSD-3-Clause",
"optional": true,
"os": [
"linux",
@ -4693,13 +4689,12 @@
}
},
"node_modules/@sentry/cli-linux-x64": {
"version": "2.38.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-linux-x64/-/cli-linux-x64-2.38.2.tgz",
"integrity": "sha512-4UiLu9zdVtqPeltELR5MDGKcuqAdQY9xz3emISuA6bm+MXGbt2W1WgX+XY3GElwjZbmH8qpyLUEd34sw6sdcbQ==",
"version": "2.39.1",
"resolved": "https://registry.npmjs.org/@sentry/cli-linux-x64/-/cli-linux-x64-2.39.1.tgz",
"integrity": "sha512-IwayNZy+it7FWG4M9LayyUmG1a/8kT9+/IEm67sT5+7dkMIMcpmHDqL8rWcPojOXuTKaOBBjkVdNMBTXy0mXlA==",
"cpu": [
"x64"
],
"license": "BSD-3-Clause",
"optional": true,
"os": [
"linux",
@ -4710,14 +4705,13 @@
}
},
"node_modules/@sentry/cli-win32-i686": {
"version": "2.38.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-win32-i686/-/cli-win32-i686-2.38.2.tgz",
"integrity": "sha512-DYfSvd5qLPerLpIxj3Xu2rRe3CIlpGOOfGSNI6xvJ5D8j6hqbOHlCzvfC4oBWYVYGtxnwQLMeDGJ7o7RMYulig==",
"version": "2.39.1",
"resolved": "https://registry.npmjs.org/@sentry/cli-win32-i686/-/cli-win32-i686-2.39.1.tgz",
"integrity": "sha512-NglnNoqHSmE+Dz/wHeIVRnV2bLMx7tIn3IQ8vXGO5HWA2f8zYJGktbkLq1Lg23PaQmeZLPGlja3gBQfZYSG10Q==",
"cpu": [
"x86",
"ia32"
],
"license": "BSD-3-Clause",
"optional": true,
"os": [
"win32"
@ -4727,13 +4721,12 @@
}
},
"node_modules/@sentry/cli-win32-x64": {
"version": "2.38.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-win32-x64/-/cli-win32-x64-2.38.2.tgz",
"integrity": "sha512-W5UX58PKY1hNUHo9YJxWNhGvgvv2uOYHI27KchRiUvFYBIqlUUcIdPZDfyzetDfd8qBCxlAsFnkL2VJSNdpA9A==",
"version": "2.39.1",
"resolved": "https://registry.npmjs.org/@sentry/cli-win32-x64/-/cli-win32-x64-2.39.1.tgz",
"integrity": "sha512-xv0R2CMf/X1Fte3cMWie1NXuHmUyQPDBfCyIt6k6RPFPxAYUgcqgMPznYwVMwWEA1W43PaOkSn3d8ZylsDaETw==",
"cpu": [
"x64"
],
"license": "BSD-3-Clause",
"optional": true,
"os": [
"win32"

View file

@ -16,6 +16,7 @@
"@redhat-cloud-services/frontend-components-utilities": "4.0.19",
"@reduxjs/toolkit": "2.3.0",
"@scalprum/react-core": "0.9.3",
"@sentry/cli": "2.39.1",
"@sentry/webpack-plugin": "2.22.6",
"@unleash/proxy-client-react": "4.3.1",
"classnames": "2.5.1",
@ -108,7 +109,8 @@
"verify": "npm-run-all build lint test",
"postinstall": "ts-patch install",
"circular": "madge --circular ./src --extensions js,ts,tsx",
"circular:graph": "madge --circular ./src --extensions js,ts,tsx -i deps.png"
"circular:graph": "madge --circular ./src --extensions js,ts,tsx -i deps.png",
"sentry:inject": "sentry-cli sourcemaps inject --org red-hat-it --project image-builder-rhel ./dist"
},
"insights": {
"appname": "image-builder"