From 2c01907a1ab4b328e2f20ddf9e10dfe6dc17105a Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 3 May 2023 12:13:11 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- scripts/review_apps/review-apps.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/review_apps/review-apps.sh b/scripts/review_apps/review-apps.sh index 79571cb1e53..54924fb8a34 100755 --- a/scripts/review_apps/review-apps.sh +++ b/scripts/review_apps/review-apps.sh @@ -128,8 +128,22 @@ function disable_sign_ups() { true fi - # Create the root token + Disable sign-ups - local disable_signup_rb="token = User.find_by_username('root').personal_access_tokens.create(scopes: [:api], name: 'Token to disable sign-ups'); token.set_token('${REVIEW_APPS_ROOT_TOKEN}'); begin; token.save!; rescue(ActiveRecord::RecordNotUnique); end; Gitlab::CurrentSettings.current_application_settings.update!(signup_enabled: false)" +# Create the root token + Disable sign-ups +# +# We use this weird syntax because we need to pass a one-liner ruby command to a Kubernetes container via kubectl. +read -r -d '' multiline_ruby_code <