Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e488337c
Commit
e488337c
authored
Oct 05, 2020
by
Albert Salim
Committed by
Rémy Coutable
Oct 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure review app sign up is disabled
parent
f80dda64
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
.gitlab/ci/review.gitlab-ci.yml
.gitlab/ci/review.gitlab-ci.yml
+1
-1
scripts/review_apps/review-apps.sh
scripts/review_apps/review-apps.sh
+2
-2
No files found.
.gitlab/ci/review.gitlab-ci.yml
View file @
e488337c
...
...
@@ -72,7 +72,7 @@ review-deploy:
-
download_chart
-
date
-
deploy || (display_deployment_debug && exit 1)
-
disable_sign_ups
-
disable_sign_ups
|| (delete_release && exit 1)
# When the job is manual, review-qa-smoke is also manual and we don't want people
# to have to manually start the jobs in sequence, so we do it for them.
-
'
[
-z
$CI_JOB_MANUAL
]
||
play_job
"review-qa-smoke"'
...
...
scripts/review_apps/review-apps.sh
View file @
e488337c
...
...
@@ -137,7 +137,7 @@ function run_task() {
local
ruby_cmd
=
"
${
1
}
"
local
task_runner_pod
=
$(
get_pod
"task-runner"
)
kubectl
exec
-
it
-
-namespace
"
${
namespace
}
"
"
${
task_runner_pod
}
"
--
gitlab-rails runner
"
${
ruby_cmd
}
"
kubectl
exec
--namespace
"
${
namespace
}
"
"
${
task_runner_pod
}
"
--
gitlab-rails runner
"
${
ruby_cmd
}
"
}
function
disable_sign_ups
()
{
...
...
@@ -150,7 +150,7 @@ function disable_sign_ups() {
# Create the root token
local
ruby_cmd
=
"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"
r
un_task
"
${
ruby_cmd
}
"
r
etry
"run_task
\"
${
ruby_cmd
}
\"
"
# Disable sign-ups
local
signup_enabled
=
$(
retry
'curl --silent --show-error --request PUT --header "PRIVATE-TOKEN: ${REVIEW_APPS_ROOT_TOKEN}" "${CI_ENVIRONMENT_URL}/api/v4/application/settings?signup_enabled=false" | jq ".signup_enabled"'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment