How to set release ID for SDK when deployments are done via CI #5457
|
Hi there, I'd like to set up release health with the Sentry SDK (React, not using create-react-app). As part of that, we need to set However, we set the release using the Sentry CLI tool in our CI pipelines, i.e. curl -sL https://sentry.io/get-cli/ | bash
export SENTRY_RELEASE=$(sentry-cli releases propose-version)
sentry-cli releases new -p $SENTRY_PROJECT $SENTRY_RELEASE
sentry-cli releases set-commits $SENTRY_RELEASE --auto
sentry-cli releases files $SENTRY_RELEASE
sentry-cli releases finalize $SENTRY_RELEASE
sentry-cli releases deploys $SENTRY_RELEASE new -e productionSince we're setting the release in our CI pipelines, there's no way to feed the version back into the project. Is there a recommended pattern for achieving this? |
Answered by
AbhiPrasad
Jul 25, 2022
Replies: 1 comment 1 reply
|
We recommend injecting the variable using your bundler. For example, see how it's done with webpack: https://webpack.js.org/guides/environment-variables/ |
1 reply
Answer selected by
grug
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We recommend injecting the variable using your bundler. For example, see how it's done with webpack: https://webpack.js.org/guides/environment-variables/