Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Commit e88123b

Browse files
committed
Added ability to target any space
1 parent c77a942 commit e88123b

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

lib/cf_authenticator.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ def initialize
55

66
def authenticate_with(username,password,org,space)
77
auth_result = `cf auth #{username} #{password}`
8+
if !auth_result
9+
puts "Could not load the Cloud Foundry Command Line Interface\nGet it at http://docs.cloudfoundry.org/devguide/installcf/install-go-cli.html"
10+
exit
11+
end
812
if auth_result.include?("FAILED")
913
puts 'Authentication failed, exiting'
1014
exit

lib/cf_deploy.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,7 @@ def wait_for_input_with(question)
6666

6767
def push_to_cf
6868
puts 'pushing to Cloud Foundry...'
69-
if @actual_env === 'project-monitor-staging'
70-
puts `cf push project-monitor-staging -f config/cf/manifest-staging.yml`
71-
end
72-
if @actual_env === 'project-monitor-production'
73-
puts `cf push project-monitor-production -f config/cf/manifest-production.yml`
74-
end
69+
puts `cf push #{@actual_env}`
7570
puts `cf logout`
7671
end
7772

0 commit comments

Comments
 (0)