Sha256: de7343ac5cda1ff4a31296b9a718781e8d050c71cef25ac5d14ab5a0827422a9
Contents?: true
Size: 1.14 KB
Versions: 26
Compression:
Stored size: 1.14 KB
Contents
module DPL class Provider class CloudFoundry < Provider def initial_go_tools_install context.shell 'wget \'https://cli.run.pivotal.io/stable?release=linux64-binary&source=github\' -qO cf-linux-amd64.tgz && tar -zxvf cf-linux-amd64.tgz && rm cf-linux-amd64.tgz' end def check_auth initial_go_tools_install context.shell "./cf api #{option(:api)} #{'--skip-ssl-validation' if options[:skip_ssl_validation]}" context.shell "./cf login -u #{option(:username)} -p #{option(:password)} -o #{option(:organization)} -s #{option(:space)}" end def check_app if options[:manifest] error 'Application must have a manifest.yml for unattended deployment' unless File.exists? options[:manifest] end end def needs_key? false end def push_app error 'Failed to push app' unless context.shell("./cf push#{manifest}") ensure context.shell "./cf logout" end def cleanup end def uncleanup end def manifest options[:manifest].nil? ? "" : " -f #{options[:manifest]}" end end end end
Version data entries
26 entries across 26 versions & 1 rubygems