Page MenuHomeSoftware Heritage

jobs/swh-pypi-groovy: Use Sentry auth token when building web assets
ClosedPublic

Authored by anlambert on Aug 10 2022, 5:57 PM.

Details

Summary

It enables to upload JavaScript source maps generated by webpack to
help debugging swh-web JavaScript errors in Sentry Web UI.

The Sentry webpack plugin must be used in webpack configuration to
do so.

For the record, I have added my Sentry authentication token in Jenkins
credentials.

Related to D8232

Diff Detail

Repository
rCJSWH Jenkins jobs
Branch
add-sentry-auth-token
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 30764
Build 48103: arc lint + arc unit

Event Timeline

olasd added a subscriber: olasd.

Is there a way to use a "service" token rather than one tied to an individual account?

This revision is now accepted and ready to land.Aug 11 2022, 1:39 PM
In D8233#214151, @olasd wrote:

Is there a way to use a "service" token rather than one tied to an individual account?

Apparently, we can use a token from an organization account (see doc).
Reading a bit on the subject, we need to create an internal integration in order to obtain a service token.
So I connected to Sentry as admin and created an integration for the swh-web source maps upload (see here).
I tested the generated token locally and could successfully upload the source maps generated by webpack to sentry.
I have updated the token on Jenkins with that one and removed mine.