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 12:49:54 +0000
commit61e7453e0465ceb631d3e8445429cfed7c1449d3 (patch)
treef20fabfca0a5d7cdf694f1df69c88788b3f8eb65 /config
parentad14c1bf85f716ed698e8802161de74f462a106c (diff)
parent72229c375fb3efe9dd28c0bf98f0df7696d99fc2 (diff)
downloadgitlab-ce-61e7453e0465ceb631d3e8445429cfed7c1449d3.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