forked from zendesk/samson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.rb
124 lines (97 loc) · 3.09 KB
/
routes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Samson::Application.routes.draw do
resources :projects do
resources :jobs, only: [:index, :new, :create, :show, :destroy]
resources :macros, only: [:index, :new, :create, :edit, :update, :destroy] do
member { post :execute }
end
resources :builds, only: [:show, :index, :new, :create, :edit, :update] do
member do
post :build_docker_image
end
end
resources :deploys, only: [:index, :show, :destroy] do
collection do
get :active
get :active_count
end
member do
post :buddy_check
post :pending_start
get :changeset
end
end
resources :releases, only: [:show, :index, :new, :create]
resources :stages do
collection do
patch :reorder
end
member do
get :new_relic, to: 'new_relic#show'
get :clone, to: 'stages#clone'
end
resources :deploys, only: [:new, :create] do
collection do
post :confirm
end
end
end
resource :changelog, only: [:show]
resources :webhooks, only: [:index, :create, :destroy]
resource :commit_statuses, only: [:show]
resources :references, only: [:index]
resources :users, only: [:index, :update]
resources :project_roles, only: [:create, :update]
member do
get :deploy_group_versions
end
end
resources :streams, only: [:show]
resources :locks, only: [:create, :destroy]
resources :deploys, only: [:index] do
collection do
get :active
get :active_count
get :recent
end
end
resources :deploy_groups, only: [:show]
resource :profile, only: [:show, :update]
get '/auth/github/callback', to: 'sessions#github'
get '/auth/google/callback', to: 'sessions#google'
post '/auth/ldap/callback', to: 'sessions#ldap'
get '/auth/failure', to: 'sessions#failure'
get '/jobs/enabled', to: 'jobs#enabled', as: :enabled_jobs
get '/login', to: 'sessions#new'
get '/logout', to: 'sessions#destroy'
resources :stars, only: [:create, :destroy]
resources :dashboards, only: [:show] do
member do
get :deploy_groups
end
end
namespace :admin do
resources :users, only: [:index, :show, :update, :destroy]
resource :projects, only: [:show]
resources :commands, except: [:show]
resources :environments, except: [:show]
resources :deploy_groups do
member do
get :deploy_all
post :deploy_all_now
end
end
end
namespace :integrations do
post "/travis/:token" => "travis#create", as: :travis_deploy
post "/semaphore/:token" => "semaphore#create", as: :semaphore_deploy
post "/tddium/:token" => "tddium#create", as: :tddium_deploy
post "/jenkins/:token" => "jenkins#create", as: :jenkins_deploy
post "/buildkite/:token" => "buildkite#create", as: :buildkite_deploy
post "/github/:token" => "github#create", as: :github_deploy
end
get '/ping', to: 'ping#show'
resources :access_requests, only: [:new, :create]
get '/project_roles', to: 'project_roles#index'
mount SseRailsEngine::Engine, at: '/streaming'
root to: 'projects#index'
end