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 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
@@ -26,11 +26,7 @@ module EY
26
26
  end
27
27
 
28
28
  def extra_config
29
- extras = @cli_opts.fetch('extra_deploy_hook_options', {})
30
- if in_repo?
31
- extras = @env_config.merge(extras)
32
- end
33
- extras
29
+ @cli_opts.fetch('extra_deploy_hook_options', {})
34
30
  end
35
31
 
36
32
  private
@@ -1,3 +1,3 @@
1
1
  module EY
2
- VERSION = '2.0.0.pre2'
2
+ VERSION = '2.0.0.pre3'
3
3
  end
@@ -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.should =~ /--config '{.*"bert":"ernie".*}'/
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.pre2
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-05-30 00:00:00.000000000 Z
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.pre2
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.pre2
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