-
-
Save ujjain/42ed3507e6c0465658e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if stage == s['name'] | |
log.debug "#{build_key} #{stage} in lifecycle state #{s['lifeCycleState']} and state #{s['state']}" | |
return s.values_at("lifeCycleState","state") | |
end | |
end | |
raise "Could not find stage '#{stage}' for build '#{build_key}'" | |
else | |
raise "Error communicating - #{res.code} #{res.body}" | |
end | |
end | |
def progress_build_to_stage(build_key, stage, variables = {}) | |
#raise "Stage '#{stage}' has already been executed in build '#{build_key}'" unless 'NotBuilt' == get_lifecycle_state_for_stage(build_key, stage) | |
lifecycle_state = get_lifecycle_state_for_stage(build_key, stage) | |
if(lifecycle_state['lifecycle_state'] == "Finished" && lifecycle_state['state'] == "Successful") | |
raise "Stage '#{stage}' has already been succesfully executed in build '#{build_key}'" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment