diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-09-12 08:08:17 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-09-12 08:08:17 +0000 |
commit | f87809f78de9da04f38134ba5ce0cf9ddebf2f63 (patch) | |
tree | 428cac4c906069eb9d63ef32158c0c92b8348a0e /app/models/clusters | |
parent | a3c3776b5c7fd5c3c6c7bc9ee846b4d105333b32 (diff) | |
parent | aa15c9feecf7e8f69d65371d784c00d6552eebb9 (diff) | |
download | gitlab-ce-f87809f78de9da04f38134ba5ce0cf9ddebf2f63.tar.gz |
Merge branch 'dz-add-project-id-to-jupyter' into 'master'
Add GitLab project id to jupyter config installed via cluster apps
See merge request gitlab-org/gitlab-ce!21341
Diffstat (limited to 'app/models/clusters')
-rw-r--r-- | app/models/clusters/applications/jupyter.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/clusters/applications/jupyter.rb b/app/models/clusters/applications/jupyter.rb index 3d84eeed5a8..2371b0237d8 100644 --- a/app/models/clusters/applications/jupyter.rb +++ b/app/models/clusters/applications/jupyter.rb @@ -73,10 +73,19 @@ module Clusters "clientSecret" => oauth_application.secret, "callbackUrl" => callback_url } + }, + "singleuser" => { + "extraEnv" => { + "GITLAB_PROJECT_ID" => project_id + } } } end + def project_id + cluster&.project&.id + end + def gitlab_url Gitlab.config.gitlab.url end |