summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-10-19 07:53:05 +0000
committerRémy Coutable <remy@rymai.me>2016-10-20 16:43:39 +0200
commit74974f023af3b7219f3267aa58ceac711aee0cc1 (patch)
tree7cb2f5b5fa4b3087d47b0d79cb98fb0d43f52a65 /config
parentc8b2b3f7c32db873f1bebce3e3b1847ea24d235f (diff)
downloadgitlab-ce-74974f023af3b7219f3267aa58ceac711aee0cc1.tar.gz
Merge branch '22191-delete-dynamic-envs-mr' into 'master'
Delete dynamic environments - Adds "close environment" action to a merge request - Adds tabs to environments list - Adds close button to each environment row in environments list - Replaces Destroy button with Close button inside an environment - Adds close button to builds list inside an environment In order to enable stopping environments a valid `.gitlab-ci.yml` syntax has to be used: ``` review: environment: name: review/$app on_stop: stop_review stop_review: script: echo Delete My App when: manual environment: name: review/$app action: stop ``` This MR requires that `stop_review` has to have: `when`, `environment:name` and `environment:action` defined. The next MR after this one will verify that and enforce that these settings are configured. It will also implicitly configure these settings, making it possible to define it like this: ``` review: environment: name: review/$app on_stop: stop_review stop_review: script: echo Delete My App ``` Closes #22191 See merge request !6669 Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'config')
-rw-r--r--config/routes/project.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 711a59df744..8142e231621 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -319,7 +319,11 @@ resources :namespaces, path: '/', constraints: { id: /[a-zA-Z.0-9_\-]+/ }, only:
end
end
- resources :environments
+ resources :environments, except: [:destroy] do
+ member do
+ post :stop
+ end
+ end
resource :cycle_analytics, only: [:show]