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 production Since 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? |
Beta Was this translation helpful? Give feedback.
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/ |
Beta Was this translation helpful? Give feedback.
We recommend injecting the variable using your bundler. For example, see how it's done with webpack: https://webpack.js.org/guides/environment-variables/