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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
02129c29
Commit
02129c29
authored
Aug 22, 2018
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GitLab cluster id to jupyter config
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
a744279f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
app/models/clusters/applications/jupyter.rb
app/models/clusters/applications/jupyter.rb
+5
-0
spec/models/clusters/applications/jupyter_spec.rb
spec/models/clusters/applications/jupyter_spec.rb
+7
-0
No files found.
app/models/clusters/applications/jupyter.rb
View file @
02129c29
...
@@ -73,6 +73,11 @@ module Clusters
...
@@ -73,6 +73,11 @@ module Clusters
"clientSecret"
=>
oauth_application
.
secret
,
"clientSecret"
=>
oauth_application
.
secret
,
"callbackUrl"
=>
callback_url
"callbackUrl"
=>
callback_url
}
}
},
"singleuser"
=>
{
"extraEnv"
=>
{
"GITLAB_CLUSTER_ID"
=>
cluster
.
id
}
}
}
}
}
end
end
...
...
spec/models/clusters/applications/jupyter_spec.rb
View file @
02129c29
...
@@ -108,8 +108,15 @@ describe Clusters::Applications::Jupyter do
...
@@ -108,8 +108,15 @@ describe Clusters::Applications::Jupyter do
expect
(
values
).
to
include
(
'rbac'
)
expect
(
values
).
to
include
(
'rbac'
)
expect
(
values
).
to
include
(
'proxy'
)
expect
(
values
).
to
include
(
'proxy'
)
expect
(
values
).
to
include
(
'auth'
)
expect
(
values
).
to
include
(
'auth'
)
expect
(
values
).
to
include
(
'singleuser'
)
expect
(
values
).
to
match
(
/clientId: '?
#{
application
.
oauth_application
.
uid
}
/
)
expect
(
values
).
to
match
(
/clientId: '?
#{
application
.
oauth_application
.
uid
}
/
)
expect
(
values
).
to
match
(
/callbackUrl: '?
#{
application
.
callback_url
}
/
)
expect
(
values
).
to
match
(
/callbackUrl: '?
#{
application
.
callback_url
}
/
)
end
end
context
'when cluster belongs to a project'
do
it
'sets GitLab project id'
do
expect
(
values
).
to
match
(
/GITLAB_CLUSTER_ID: '?
#{
application
.
cluster
.
id
}
/
)
end
end
end
end
end
end
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