Extract common `when` code between CI/CD processables

This commit is contained in:
Grzegorz Bizon 2019-01-23 11:36:29 +01:00
parent cd9409f003
commit 8850da27c3
3 changed files with 1 additions and 12 deletions

View File

@ -37,13 +37,6 @@ module Ci
false
end
##
# TODO we probably want to add support for `when` configuration.
#
def when
'on_success'
end
def expanded_environment_name
end

View File

@ -639,10 +639,6 @@ module Ci
super || project.try(:build_coverage_regex)
end
def when
read_attribute(:when) || 'on_success'
end
def options
read_metadata_attribute(:options, :config_options, {})
end

View File

@ -17,7 +17,7 @@ module Ci
end
def when
raise NotImplementedError
read_attribute(:when) || 'on_success'
end
def expanded_environment_name