forked from zendesk/samson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.rb
172 lines (137 loc) · 4.71 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# frozen_string_literal: true
Samson::Application.routes.draw do
root to: 'projects#index'
resources :projects do
resources :jobs, only: [:index, :show, :destroy]
resources :builds, only: [:show, :index, :new, :create, :edit, :update] do
member do
post :build_docker_image
end
end
resource :build_command, only: [:show, :update]
resources :deploys, only: [:index, :show, :destroy] do
collection do
get :active
end
member do
post :buddy_check
get :changeset
end
end
resources :releases, only: [:show, :index, :new, :create], id: /v(#{Samson::RELEASE_NUMBER})/
resources :stages do
collection do
patch :reorder
end
member do
get :clone, to: 'stages#clone'
post :clone, to: 'stages#clone'
end
resources :deploys, only: [:new, :create] do
collection do
post :confirm
end
end
resource :commit_statuses, only: [:show]
end
resource :changelog, only: [:show]
resource :stars, only: [:create]
resources :webhooks, only: [:index, :create, :update, :destroy]
resources :outbound_webhooks, only: [:index, :create, :update, :destroy]
resources :references, only: [:index]
resources :user_project_roles, only: [:index]
member do
get :deploy_group_versions
end
end
resources :user_project_roles, only: [:index, :create]
resources :locks, only: [:index, :create, :destroy]
resources :deploys, only: [:index] do
collection do
get :active
get :active_count
end
end
resources :builds, only: [:index]
resource :profile, only: [:show, :update]
resources :users
resources :access_tokens, only: [:index, :new, :create, :destroy]
resources :environments, except: [:edit]
resources :audits, only: [:index, :show]
resources :commands, except: [:edit]
resources :deploy_groups do
member do
get :missing_config
end
resource :mass_rollouts, only: [:new, :create, :destroy] do
collection do
post :merge
get :review_deploy
post :deploy
end
end
end
resources :secrets, except: [:edit] do
collection do
get :duplicates
end
member do
get :history
post :revert
end
end
resources :secret_sharing_grants, except: [:edit, :update]
resources :users, only: [] do
resource :user_merges, only: [:new, :create]
end
resources :vault_servers, except: [:edit] do
member do
post :sync
end
end
# legacy, can be removed when it is no longer used
delete '/api/users/:id', to: 'users#destroy'
post '/api/projects/:project_id/builds', to: 'builds#create'
get '/api/deploy_groups', to: 'deploy_groups#index'
get '/api/projects/:project_id/stages/:id/deploy_groups', to: 'deploy_groups#index'
get '/api/locks', to: 'locks#index'
post '/api/locks', to: 'locks#create'
delete '/api/locks/:id', to: 'locks#destroy'
delete '/locks', to: 'locks#destroy'
delete '/api/locks', to: 'locks#destroy'
get '/api/projects', to: 'projects#index'
post '/api/projects/:project_id/automated_deploys', to: 'automated_deploys#create'
get '/api/deploys/active_count', to: 'deploys#active_count'
get '/api/deploys/:id', to: 'deploys#show'
get '/api/deploys', to: 'deploys#index'
get '/auth/github/callback', to: 'sessions#github'
get '/auth/google/callback', to: 'sessions#google'
post '/auth/ldap/callback', to: 'sessions#ldap'
get '/auth/gitlab/callback', to: 'sessions#gitlab'
get '/auth/bitbucket/callback', to: 'sessions#bitbucket'
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 :csv_exports, only: [:index, :new, :create, :show]
resources :dashboards, only: [:show] do
member do
get :deploy_groups
end
end
namespace :integrations do
post "/circleci/:token" => "circleci#create", as: :circleci_deploy
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
post "/generic/:token" => "generic#create", as: :generic_deploy
end
get '/ping', to: 'ping#show'
get '/error', to: 'ping#error'
resources :access_requests, only: [:new, :create]
use_doorkeeper # adds oauth/* routes
resources :oauth_test, only: [:index, :show] if %w[development test].include?(Rails.env)
end