Commit c2b63e55 authored by Stan Hu's avatar Stan Hu

Enable Sentry for Review Apps

This will make it easier for people to diagnose errors without needing
to access the Review Apps cluster directly. This came out of
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72722.

This relies on a `REVIEW_APPS_SENTRY_DSN` CI/CD variable being defined,
which is now defined in the gitlab-org group.
parent 8fcd20a6
......@@ -263,6 +263,12 @@ function deploy() {
gitaly_image_tag=$(parse_gitaly_image_tag)
gitlab_shell_image_repository="${IMAGE_REPOSITORY}/gitlab-shell"
gitlab_workhorse_image_repository="${IMAGE_REPOSITORY}/gitlab-workhorse-ee"
sentry_enabled="false"
if [ -n ${REVIEW_APPS_SENTRY_DSN} ]; then
echo "REVIEW_APPS_SENTRY_DSN detected, enabling Sentry"
sentry_enabled="true"
fi
ensure_namespace "${namespace}"
label_namespace "${namespace}" "tls=review-apps-tls" # label namespace for kubed to sync tls
......@@ -283,6 +289,9 @@ HELM_CMD=$(cat << EOF
--set releaseOverride="${release}" \
--set global.hosts.hostSuffix="${HOST_SUFFIX}" \
--set global.hosts.domain="${REVIEW_APPS_DOMAIN}" \
--set global.sentry.enabled="${sentry_enabled}" \
--set global.sentry.dsn="${REVIEW_APPS_SENTRY_DSN}" \
--set global.sentry.environment="review" \
--set gitlab.migrations.image.repository="${gitlab_toolbox_image_repository}" \
--set gitlab.migrations.image.tag="${CI_COMMIT_REF_SLUG}" \
--set gitlab.gitaly.image.repository="${gitlab_gitaly_image_repository}" \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment