Sha256: 1b8326edd1ce1850ddc8873d0cc48571caff2ca85ba352b1f718037d2d342c1c
Contents?: true
Size: 939 Bytes
Versions: 112
Compression:
Stored size: 939 Bytes
Contents
module DPL class Provider class Openshift < Provider requires 'rhc' def api @api ||= ::RHC::Rest::Client.new(:user => option(:user), :password => option(:password), :server => 'openshift.redhat.com') end def user @user ||= api.user.login end def app @app ||= api.find_application(option(:domain), option(:app)) end def check_auth log "authenticated as %s" % user end def check_app log "found app #{app.name}" end def setup_key(file, type = nil) specified_type, content, comment = File.read(file).split api.add_key(option(:key_name), content, type || specified_type) end def remove_key api.delete_key(option(:key_name)) end def push_app context.shell "git push #{app.git_url} -f" end def restart app.restart end end end end
Version data entries
112 entries across 112 versions & 1 rubygems