summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-19 12:49:54 +0000
committerRémy Coutable <remy@rymai.me>2016-07-19 16:34:37 +0200
commite9e750f594bbc4d5cd816988de8fe992598cc186 (patch)
tree99b0b8dda18768208879c51994be45005f778a30 /config
parent263a9db7212a09cf53c09f4c2b5a3ee16e4fc702 (diff)
downloadgitlab-ce-e9e750f594bbc4d5cd816988de8fe992598cc186.tar.gz
Merge branch 'manual-actions' into 'master'
Add support for manual CI actions ## What does this MR do? This implements a `when: manual` which allows a jobs to be marked as manual actions. Manual actions have to be explicitly executed by developers. ## What are the relevant issue numbers? This is to solve: https://gitlab.com/gitlab-org/gitlab-ce/issues/17010 See merge request !5297
Diffstat (limited to 'config')
-rw-r--r--config/initializers/relative_naming_ci_namespace.rb16
-rw-r--r--config/routes.rb1
2 files changed, 17 insertions, 0 deletions
diff --git a/config/initializers/relative_naming_ci_namespace.rb b/config/initializers/relative_naming_ci_namespace.rb
new file mode 100644
index 00000000000..59abe1b9b91
--- /dev/null
+++ b/config/initializers/relative_naming_ci_namespace.rb
@@ -0,0 +1,16 @@
+# Description: https://coderwall.com/p/heed_q/rails-routing-and-namespaced-models
+#
+# This allows us to use CI ActiveRecord objects in all routes and use it:
+# - [project.namespace, project, build]
+#
+# instead of:
+# - namespace_project_build_path(project.namespace, project, build)
+#
+# Without that, Ci:: namespace is used for resolving routes:
+# - namespace_project_ci_build_path(project.namespace, project, build)
+
+module Ci
+ def self.use_relative_model_naming?
+ true
+ end
+end
diff --git a/config/routes.rb b/config/routes.rb
index 3160fd767b8..be651d8903f 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -750,6 +750,7 @@ Rails.application.routes.draw do
get :status
post :cancel
post :retry
+ post :play
post :erase
get :trace
get :raw