summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWolphin <wolphin@wolph.in>2019-04-09 09:28:55 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2019-04-09 09:28:55 +0000
commit0a4f44de83fac88f39d9f4507c2fa4d935703e1b (patch)
tree33c08ba08bbd2f50bad523622b309d9ef313b185 /lib
parent1fce09ed0dc775d706d61e37268b6f39c3fe3de6 (diff)
downloadgitlab-ce-0a4f44de83fac88f39d9f4507c2fa4d935703e1b.tar.gz
Add environment url validation
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/config/entry/environment.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/ci/config/entry/environment.rb b/lib/gitlab/ci/config/entry/environment.rb
index 69a3a1aedef..5a13fd18504 100644
--- a/lib/gitlab/ci/config/entry/environment.rb
+++ b/lib/gitlab/ci/config/entry/environment.rb
@@ -36,10 +36,12 @@ module Gitlab
validates :config, allowed_keys: ALLOWED_KEYS
validates :url,
+ type: String,
length: { maximum: 255 },
allow_nil: true
validates :action,
+ type: String,
inclusion: { in: %w[start stop], message: 'should be start or stop' },
allow_nil: true