summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb99
1 files changed, 99 insertions, 0 deletions
diff --git a/config/routes.rb b/config/routes.rb
index d7307a61ede..74544d63d86 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -2,6 +2,105 @@ require 'sidekiq/web'
require 'api/api'
Gitlab::Application.routes.draw do
+ namespace :ci do
+ # CI API
+ Ci::API::API.logger Rails.logger
+ mount Ci::API::API => '/api'
+
+ resource :lint, only: [:show, :create]
+
+ resource :help do
+ get :oauth2
+ end
+
+ resources :projects do
+ collection do
+ post :add
+ get :gitlab
+ end
+
+ member do
+ get :status, to: 'projects#badge'
+ get :integration
+ post :build
+ post :toggle_shared_runners
+ get :dumped_yaml
+ end
+
+ resources :services, only: [:index, :edit, :update] do
+ member do
+ get :test
+ end
+ end
+
+ resource :charts, only: [:show]
+
+ resources :refs, constraints: { ref_id: /.*/ }, only: [] do
+ resources :commits, only: [:show] do
+ member do
+ get :status
+ get :cancel
+ end
+ end
+ end
+
+ resources :builds, only: [:show] do
+ member do
+ get :cancel
+ get :status
+ post :retry
+ end
+ end
+
+ resources :web_hooks, only: [:index, :create, :destroy] do
+ member do
+ get :test
+ end
+ end
+
+ resources :triggers, only: [:index, :create, :destroy]
+
+ resources :runners, only: [:index, :edit, :update, :destroy, :show] do
+ member do
+ get :resume
+ get :pause
+ end
+ end
+
+ resources :runner_projects, only: [:create, :destroy]
+
+ resources :events, only: [:index]
+ resource :variables, only: [:show, :update]
+ end
+
+ resource :user_sessions do
+ get :auth
+ get :callback
+ end
+
+ namespace :admin do
+ resources :runners, only: [:index, :show, :update, :destroy] do
+ member do
+ put :assign_all
+ get :resume
+ get :pause
+ end
+ end
+
+ resources :events, only: [:index]
+
+ resources :projects do
+ resources :runner_projects
+ end
+
+ resources :builds, only: :index
+
+ resource :application_settings, only: [:show, :update]
+ end
+
+ root to: 'projects#index'
+ end
+
use_doorkeeper do
controllers applications: 'oauth/applications',
authorized_applications: 'oauth/authorized_applications',