diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-09-19 18:45:44 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-09-19 18:45:44 +0300 |
commit | c60bdf91895c64683e937715d4b821e844daf5ee (patch) | |
tree | c6175583051409ec83b77a58ee0d5a86002cb16e /lib/gitlab/ci/build/policy/kubernetes.rb | |
parent | 7e69f1889b1e7d86aee4faf01089a32eda35786c (diff) | |
parent | 14966419e3a598da8a51468411cd5e9bce29e1a9 (diff) |
Merge branch 'backstage/gb/jobs-triggering-policy-specifications' into 'master'
Implement job policy specifications
Closes #37280
See merge request gitlab-org/gitlab-ce!14265
Diffstat (limited to 'lib/gitlab/ci/build/policy/kubernetes.rb')
-rw-r--r-- | lib/gitlab/ci/build/policy/kubernetes.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/gitlab/ci/build/policy/kubernetes.rb b/lib/gitlab/ci/build/policy/kubernetes.rb new file mode 100644 index 00000000000..b20d374288f --- /dev/null +++ b/lib/gitlab/ci/build/policy/kubernetes.rb @@ -0,0 +1,19 @@ +module Gitlab + module Ci + module Build + module Policy + class Kubernetes < Policy::Specification + def initialize(spec) + unless spec.to_sym == :active + raise UnknownPolicyError + end + end + + def satisfied_by?(pipeline) + pipeline.has_kubernetes_active? + end + end + end + end + end +end |