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
d128545a
Commit
d128545a
authored
Apr 06, 2020
by
Etienne Baqué
Committed by
Rémy Coutable
Apr 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update route for create_deploy_token
parent
d3b62b4a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
app/helpers/ci_variables_helper.rb
app/helpers/ci_variables_helper.rb
+2
-0
config/routes/project.rb
config/routes/project.rb
+3
-2
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+1
-1
No files found.
app/helpers/ci_variables_helper.rb
View file @
d128545a
...
...
@@ -9,6 +9,8 @@ module CiVariablesHelper
if
entity
.
is_a?
(
Group
)
create_deploy_token_group_settings_ci_cd_path
(
entity
,
opts
)
else
# TODO: change this path to 'create_deploy_token_project_settings_ci_cd_path'
# See MR comment for more detail: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27059#note_311585356
create_deploy_token_project_settings_repository_path
(
entity
,
opts
)
end
end
...
...
config/routes/project.rb
View file @
d128545a
...
...
@@ -73,6 +73,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
resource
:ci_cd
,
only:
[
:show
,
:update
],
controller:
'ci_cd'
do
post
:reset_cache
put
:reset_registration_token
post
:create_deploy_token
,
path:
'deploy_token/create'
end
resource
:operations
,
only:
[
:show
,
:update
]
do
...
...
@@ -84,8 +85,8 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
resource
:integrations
,
only:
[
:show
]
resource
:repository
,
only:
[
:show
],
controller: :repository
do
# TODO:
Move 'create_deploy_token' here to the ':ci_cd' resource above during 12.9.
#
More details here: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24102#note_2875725
56
# TODO:
Removed this "create_deploy_token" route after change was made in app/helpers/ci_variables_helper.rb:14
#
See MR comment for more detail: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27059#note_3115853
56
post
:create_deploy_token
,
path:
'deploy_token/create'
,
to:
'ci_cd#create_deploy_token'
post
:cleanup
end
...
...
spec/routing/project_routing_spec.rb
View file @
d128545a
...
...
@@ -802,7 +802,7 @@ describe 'project routing' do
# TODO: remove this test as part of https://gitlab.com/gitlab-org/gitlab/issues/207079 (12.9)
it
'to ci_cd#create_deploy_token'
do
expect
(
post
(
'gitlab/gitlabhq/-/settings/
repository
/deploy_token/create'
)).
to
route_to
(
'projects/settings/ci_cd#create_deploy_token'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
expect
(
post
(
'gitlab/gitlabhq/-/settings/
ci_cd
/deploy_token/create'
)).
to
route_to
(
'projects/settings/ci_cd#create_deploy_token'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
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