Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-23 15:09:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-23 15:09:46 +0300
commitc6acc1681a6d245e00cc7edebfa2cb7a731e8c96 (patch)
treee9753f085c1b26d29905f12600516862d4c0af5d /config/routes
parentbd5d5791c552da3446db979fd2f576e91a1c1b37 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/routes')
-rw-r--r--config/routes/pipelines.rb36
-rw-r--r--config/routes/project.rb40
2 files changed, 44 insertions, 32 deletions
diff --git a/config/routes/pipelines.rb b/config/routes/pipelines.rb
new file mode 100644
index 00000000000..9b236a8ce17
--- /dev/null
+++ b/config/routes/pipelines.rb
@@ -0,0 +1,36 @@
+# 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
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 6e5784a8f92..67afbe5e7f5 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -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