engineyard 2.0.0.pre2 → 2.0.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/ey_perftools +0 -0
- data/lib/engineyard/commands/deploy.rb +60 -0
- data/lib/engineyard/deploy_config.rb +1 -5
- data/lib/engineyard/version.rb +1 -1
- data/spec/ey/deploy_spec.rb +2 -2
- metadata +4 -4
data/bin/ey_perftools
CHANGED
File without changes
|
@@ -0,0 +1,60 @@
|
|
1
|
+
class EY
|
2
|
+
module Commands
|
3
|
+
class Deploy
|
4
|
+
app_env = fetch_app_environment(options[:app], options[:environment], options[:account])
|
5
|
+
|
6
|
+
env_config = config.environment_config(app_env.environment_name)
|
7
|
+
deploy_config = EY::DeployConfig.new(options, env_config, repo, ui)
|
8
|
+
|
9
|
+
deployment = app_env.new_deployment({
|
10
|
+
:ref => deploy_config.ref,
|
11
|
+
:migrate => deploy_config.migrate,
|
12
|
+
:migrate_command => deploy_config.migrate_command,
|
13
|
+
:extra_config => deploy_config.extra_config,
|
14
|
+
})
|
15
|
+
|
16
|
+
runner = serverside_runner(app_env, deploy_config.verbose, options[:ignore_bad_master])
|
17
|
+
|
18
|
+
out = EY::CLI::UI::Tee.new(ui.out, deployment.out)
|
19
|
+
err = EY::CLI::UI::Tee.new(ui.err, deployment.err)
|
20
|
+
|
21
|
+
ui.info "Beginning deploy..."
|
22
|
+
begin
|
23
|
+
deployment.start
|
24
|
+
ui.show_deployment(deployment)
|
25
|
+
out << "Deploy initiated.\n"
|
26
|
+
|
27
|
+
runner.deploy do |args|
|
28
|
+
args.config = deployment.config if deployment.config
|
29
|
+
if deployment.migrate
|
30
|
+
args.migrate = deployment.migrate_command
|
31
|
+
else
|
32
|
+
args.migrate = false
|
33
|
+
end
|
34
|
+
args.ref = deployment.resolved_ref
|
35
|
+
end
|
36
|
+
deployment.successful = runner.call(out, err)
|
37
|
+
rescue Interrupt
|
38
|
+
err << "Interrupted. Deployment halted.\n"
|
39
|
+
ui.warn "Recording canceled deployment in EY Cloud..."
|
40
|
+
ui.warn "WARNING: Interrupting again may result in a never-finished deployment in the deployment history on EY Cloud."
|
41
|
+
raise
|
42
|
+
rescue StandardError => e
|
43
|
+
deployment.err << "Error encountered during deploy.\n#{e.class} #{e}\n"
|
44
|
+
ui.print_exception(e)
|
45
|
+
raise
|
46
|
+
ensure
|
47
|
+
deployment.finished
|
48
|
+
|
49
|
+
if deployment.successful?
|
50
|
+
ui.info "Successful deployment recorded on EY Cloud"
|
51
|
+
ui.info "Deploy complete"
|
52
|
+
ui.info "Now you can run `ey launch' to open the application in a browser."
|
53
|
+
else
|
54
|
+
ui.info "Failed deployment recorded on EY Cloud"
|
55
|
+
raise EY::Error, "Deploy failed"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
data/lib/engineyard/version.rb
CHANGED
data/spec/ey/deploy_spec.rb
CHANGED
@@ -304,9 +304,9 @@ describe "ey deploy" do
|
|
304
304
|
File.unlink("ey.yml")
|
305
305
|
end
|
306
306
|
|
307
|
-
it "gets passed along to engineyard-serverside" do
|
307
|
+
it "no longer gets passed along to engineyard-serverside (since serverside will read it on its own)" do
|
308
308
|
fast_ey %w[deploy --no-migrate]
|
309
|
-
@ssh_commands.last.
|
309
|
+
@ssh_commands.last.should_not =~ /"bert":"ernie"/
|
310
310
|
end
|
311
311
|
end
|
312
312
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engineyard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.pre3
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - '='
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 2.0.0.
|
101
|
+
version: 2.0.0.pre3
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -106,7 +106,7 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - '='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 2.0.0.
|
109
|
+
version: 2.0.0.pre3
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: engineyard-cloud-client
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|