summaryrefslogtreecommitdiff
path: root/config/routes/project.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes/project.rb')
-rw-r--r--config/routes/project.rb55
1 files changed, 30 insertions, 25 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb
index bec1f04d1f9..5aac44fce10 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -1,4 +1,5 @@
require 'constraints/project_url_constrainer'
+require 'gitlab/routes/legacy_builds'
resources :projects, only: [:index, :new, :create]
@@ -180,38 +181,42 @@ constraints(ProjectUrlConstrainer.new) do
end
end
- resources :builds, only: [:index, :show], constraints: { id: /\d+/ } do
- collection do
- post :cancel_all
-
- resources :artifacts, only: [] do
- collection do
- get :latest_succeeded,
- path: '*ref_name_and_path',
- format: false
+ scope '-' do
+ resources :jobs, only: [:index, :show], constraints: { id: /\d+/ } do
+ collection do
+ post :cancel_all
+
+ resources :artifacts, only: [] do
+ collection do
+ get :latest_succeeded,
+ path: '*ref_name_and_path',
+ format: false
+ end
end
end
- end
- member do
- get :status
- post :cancel
- post :retry
- post :play
- post :erase
- get :trace, defaults: { format: 'json' }
- get :raw
- end
+ member do
+ get :status
+ post :cancel
+ post :retry
+ post :play
+ post :erase
+ get :trace, defaults: { format: 'json' }
+ get :raw
+ end
- resource :artifacts, only: [] do
- get :download
- get :browse, path: 'browse(/*path)', format: false
- get :file, path: 'file/*path', format: false
- get :raw, path: 'raw/*path', format: false
- post :keep
+ resource :artifacts, only: [] do
+ get :download
+ get :browse, path: 'browse(/*path)', format: false
+ get :file, path: 'file/*path', format: false
+ get :raw, path: 'raw/*path', format: false
+ post :keep
+ end
end
end
+ Gitlab::Routes::LegacyBuilds.new(self).draw
+
resources :hooks, only: [:index, :create, :edit, :update, :destroy], constraints: { id: /\d+/ } do
member do
get :test