Commit 8850da27 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Extract common `when` code between CI/CD processables

parent cd9409f0
...@@ -37,13 +37,6 @@ module Ci ...@@ -37,13 +37,6 @@ module Ci
false false
end end
##
# TODO we probably want to add support for `when` configuration.
#
def when
'on_success'
end
def expanded_environment_name def expanded_environment_name
end end
......
...@@ -639,10 +639,6 @@ module Ci ...@@ -639,10 +639,6 @@ module Ci
super || project.try(:build_coverage_regex) super || project.try(:build_coverage_regex)
end end
def when
read_attribute(:when) || 'on_success'
end
def options def options
read_metadata_attribute(:options, :config_options, {}) read_metadata_attribute(:options, :config_options, {})
end end
......
...@@ -17,7 +17,7 @@ module Ci ...@@ -17,7 +17,7 @@ module Ci
end end
def when def when
raise NotImplementedError read_attribute(:when) || 'on_success'
end end
def expanded_environment_name def expanded_environment_name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment