Commit 0cf6da8e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Copy pipelines routing under - scope

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent ba432ca6
---
title: Copy pipelines routing under - scope
merge_request: 30159
author:
type: changed
# frozen_string_literal: true
resources :pipelines, only: [:index, :new, :create, :show, :destroy] do
collection do
resource :pipelines_settings, path: 'settings', only: [:show, :update]
get :charts
scope '(*ref)', constraints: { ref: Gitlab::PathRegex.git_reference_regex } do
get :latest, action: :show, defaults: { latest: true }
end
end
member do
get :stage
get :stage_ajax
post :cancel
post :retry
get :builds
get :failures
get :status
get :test_report
get :test_reports_count
end
member do
resources :stages, only: [], param: :name do
post :play_manual
end
end
end
resources :pipeline_schedules, except: [:show] do
member do
post :play
post :take_ownership
end
end
...@@ -365,39 +365,15 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -365,39 +365,15 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
post 'alerts/notify', to: 'alerting/notifications#create' post 'alerts/notify', to: 'alerting/notifications#create'
resources :pipelines, only: [:index, :new, :create, :show, :destroy] do # Unscoped route. It will be replaced with redirect to /-/pipelines/
collection do # Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
resource :pipelines_settings, path: 'settings', only: [:show, :update] draw :pipelines
get :charts
scope '(*ref)', constraints: { ref: Gitlab::PathRegex.git_reference_regex } do
get :latest, action: :show, defaults: { latest: true }
end
end
member do
get :stage
get :stage_ajax
post :cancel
post :retry
get :builds
get :failures
get :status
get :test_report
get :test_reports_count
end
member do
resources :stages, only: [], param: :name do
post :play_manual
end
end
end
resources :pipeline_schedules, except: [:show] do # To ensure an old unscoped routing is used for the UI we need to
member do # add prefix 'as' to the scope routing and place it below original routing.
post :play # Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
post :take_ownership scope '-', as: 'scoped' do
end draw :pipelines
end end
draw :legacy_builds draw :legacy_builds
......
# frozen_string_literal: true
resources :pipelines, only: [] do
member do
get :security
get :licenses
get :codequality_report
end
end
...@@ -148,14 +148,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -148,14 +148,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
post '/restore' => '/projects#restore', as: :restore post '/restore' => '/projects#restore', as: :restore
resources :pipelines, only: [] do
member do
get :security
get :licenses
get :codequality_report
end
end
resource :insights, only: [:show], trailing_slash: true do resource :insights, only: [:show], trailing_slash: true do
collection do collection do
post :query post :query
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment