Commit 6b0e6953 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'dz-scope-pipeline-routes' into 'master'

Copy pipelines routing under - scope

See merge request gitlab-org/gitlab!30159
parents fbce9ed5 0cf6da8e
---
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
post 'alerts/notify', to: 'alerting/notifications#create'
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
# Unscoped route. It will be replaced with redirect to /-/pipelines/
# Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
draw :pipelines
resources :pipeline_schedules, except: [:show] do
member do
post :play
post :take_ownership
end
# To ensure an old unscoped routing is used for the UI we need to
# add prefix 'as' to the scope routing and place it below original routing.
# Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
scope '-', as: 'scoped' do
draw :pipelines
end
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
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
collection do
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