morpheus-cli 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/morpheus/api/deploy_interface.rb +3 -2
- data/lib/morpheus/cli/deploys.rb +9 -2
- data/lib/morpheus/cli/instances.rb +1 -1
- data/lib/morpheus/cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c20e792c2e9a6b6eacd2c3b68c6433f110e8d6e
|
4
|
+
data.tar.gz: 7f64833bddcfaab7163a159ba1f2bac6bc6be940
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3221c0b5eeeb5f3b99212e135e1d07e4a5f6ada0c69c0ffcd479aaf24e399efd1c72bb1b2a05ff2b3b1f4b11d8d3ee937ec20b1c7f6b2c2dc5ba687a82fe1c15
|
7
|
+
data.tar.gz: 9909b64c97552e1e7d2342d4edbb4e43a8bd657cf945e742207f9a2b0874342aa971112f86ad8b5c2d8bef70c3335cacca905fe61677cf15b62840568fdfa15f
|
@@ -51,7 +51,7 @@ class Morpheus::DeployInterface < Morpheus::APIClient
|
|
51
51
|
url += "/#{destination}"
|
52
52
|
end
|
53
53
|
|
54
|
-
headers = { :authorization => "Bearer #{@access_token}"
|
54
|
+
headers = { :authorization => "Bearer #{@access_token}"}
|
55
55
|
|
56
56
|
payload = nil
|
57
57
|
# TODO: Setup payload to be contents of file appropriately
|
@@ -59,6 +59,7 @@ class Morpheus::DeployInterface < Morpheus::APIClient
|
|
59
59
|
method: :post,
|
60
60
|
url: url,
|
61
61
|
headers: headers,
|
62
|
+
timeout: nil,
|
62
63
|
payload: {
|
63
64
|
multipart: true,
|
64
65
|
file: File.new(path, 'rb')
|
@@ -83,7 +84,7 @@ class Morpheus::DeployInterface < Morpheus::APIClient
|
|
83
84
|
end
|
84
85
|
end
|
85
86
|
headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' }
|
86
|
-
response = RestClient::Request.execute(method: :post, url: url, headers: headers, payload: payload.to_json)
|
87
|
+
response = RestClient::Request.execute(method: :post, url: url, headers: headers, timeout: nil, payload: payload.to_json)
|
87
88
|
JSON.parse(response.to_s)
|
88
89
|
end
|
89
90
|
end
|
data/lib/morpheus/cli/deploys.rb
CHANGED
@@ -42,7 +42,7 @@ class Morpheus::Cli::Deploys
|
|
42
42
|
return
|
43
43
|
end
|
44
44
|
|
45
|
-
instance_results = @instances_interface.get(name: deploy_args[
|
45
|
+
instance_results = @instances_interface.get(name: deploy_args['name'])
|
46
46
|
if instance_results['instances'].empty?
|
47
47
|
puts "Instance not found by name #{args[0]}"
|
48
48
|
return
|
@@ -90,7 +90,13 @@ class Morpheus::Cli::Deploys
|
|
90
90
|
end
|
91
91
|
|
92
92
|
deploy_payload = {}
|
93
|
-
|
93
|
+
if deploy_args['env']
|
94
|
+
evars = []
|
95
|
+
deploy_args['env'].each_pair do |key, value|
|
96
|
+
evars << {name: key, value: value, export: false}
|
97
|
+
end
|
98
|
+
@instances_interface.create_env(instance_id,evars)
|
99
|
+
end
|
94
100
|
if deploy_args['options']
|
95
101
|
deploy_payload = {
|
96
102
|
appDeploy: {
|
@@ -98,6 +104,7 @@ class Morpheus::Cli::Deploys
|
|
98
104
|
}
|
99
105
|
}
|
100
106
|
end
|
107
|
+
|
101
108
|
print cyan, bold, "Deploying to Servers...", reset, "\n"
|
102
109
|
@deploy_interface.deploy(deployment_id,deploy_payload)
|
103
110
|
print cyan, bold, "Deploy Successful!", reset, "\n"
|
@@ -229,7 +229,7 @@ class Morpheus::Cli::Instances
|
|
229
229
|
envs += env_results['readOnlyEnvs'].map { |k,v| {:name => k, :value => k.downcase.include?("password") ? "********" : v, :export => true}}
|
230
230
|
end
|
231
231
|
tp envs, :name, :value, :export
|
232
|
-
print "\n" ,cyan, bold, "
|
232
|
+
print "\n" ,cyan, bold, "Imported Envs\n","==================", "\n\n", reset, cyan
|
233
233
|
imported_envs = env_results['importedEnvs'].map { |k,v| {:name => k, :value => k.downcase.include?("password") ? "********" : v}}
|
234
234
|
tp imported_envs
|
235
235
|
print reset, "\n"
|
data/lib/morpheus/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: morpheus-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Estes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|