Skip to content

Instantly share code, notes, and snippets.

@ujjain

ujjain/bla.rb Secret

Created March 18, 2016 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ujjain/42ed3507e6c0465658e3 to your computer and use it in GitHub Desktop.
Save ujjain/42ed3507e6c0465658e3 to your computer and use it in GitHub Desktop.
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