Extract common `when` code between CI/CD processables
This commit is contained in:
parent
cd9409f003
commit
8850da27c3
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -17,7 +17,7 @@ module Ci
|
|||
end
|
||||
|
||||
def when
|
||||
raise NotImplementedError
|
||||
read_attribute(:when) || 'on_success'
|
||||
end
|
||||
|
||||
def expanded_environment_name
|
||||
|
|
Loading…
Reference in New Issue