hako 0.11.2 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d549e8298f55d8041ba2145b1c998e4d79599b00
4
- data.tar.gz: 0146d1c6afb1656392c10ae228642ce377d67535
3
+ metadata.gz: e0cc680f33d2f80eed9ad5382ffe32075894a54b
4
+ data.tar.gz: c1c79b446727c880bdf9e37a8e56f5b1bc690e44
5
5
  SHA512:
6
- metadata.gz: 9f9a58886928803eb03e7e8a496a4185aca24c6a08a4c02bffb093704e2149d2206476294310509072c26402388ffcf945be07cb3b9cb098717ca3fcbb315fc1
7
- data.tar.gz: 8ade6928c0b2e7b017cb7fd8b8e03d26290f43a619f7e6892e56d17e881b65e35a36924dc1f2b472c4530604cef353e6de0e1a17ff1e6997f55bffe99fa78d87
6
+ metadata.gz: 0f00ead195423c3db231323b7403c3d8ec7adf16ad140da95a33ee8ce84bae8ec7529b21572148a66d3e583c7b8bb456d5d102b5f063df7d6a3bb37be0807f73
7
+ data.tar.gz: 879ad5e2940302f60211b27b8ef644a263d4ae4601db50f347e536de5e5ccb349bc8a22e827a089466bd362bdabd45f5df741ef73eb5a2197bbeb89c577e4e45
@@ -18,9 +18,9 @@ module Hako
18
18
  volumes = @app.yaml.fetch('volumes', [])
19
19
  scheduler = load_scheduler(@app.yaml['scheduler'], scripts, volumes: volumes, force: force, dry_run: dry_run)
20
20
 
21
- scripts.each { |script| script.before_deploy(containers) }
21
+ scripts.each { |script| script.deploy_starting(containers) }
22
22
  scheduler.deploy(containers)
23
- scripts.each { |script| script.after_deploy(containers) }
23
+ scripts.each { |script| script.deploy_finished(containers) }
24
24
  end
25
25
 
26
26
  def oneshot(commands, tag:, containers:, env: {}, dry_run: false)
@@ -29,9 +29,11 @@ module Hako
29
29
  volumes = @app.yaml.fetch('volumes', [])
30
30
  scheduler = load_scheduler(@app.yaml['scheduler'], scripts, volumes: volumes, dry_run: dry_run)
31
31
 
32
+ scripts.each { |script| script.oneshot_starting(containers) }
32
33
  exit_code = with_oneshot_signal_handlers(scheduler) do
33
34
  scheduler.oneshot(containers, commands, env)
34
35
  end
36
+ scripts.each { |script| script.oneshot_finished(containers) }
35
37
  exit exit_code
36
38
  end
37
39
 
@@ -29,6 +29,7 @@ module Hako
29
29
  app = containers.fetch('app')
30
30
  front = containers.fetch('front')
31
31
  front_port = determine_front_port
32
+ @scripts.each { |script| script.deploy_started(containers, front_port) }
32
33
  definitions = create_definitions(containers, front_port)
33
34
 
34
35
  if @dry_run
@@ -9,16 +9,27 @@ module Hako
9
9
  configure(options)
10
10
  end
11
11
 
12
- def configure(_options)
12
+ def deploy_starting(_containers)
13
+ end
14
+
15
+ def deploy_started(_containers, _front_port)
13
16
  end
14
17
 
15
- def before_deploy(_containers)
18
+ def deploy_finished(_containers)
16
19
  end
17
20
 
18
- def after_deploy(_containers)
21
+ def oneshot_starting(_containers)
19
22
  end
20
23
 
21
24
  def oneshot_started(_scheduler)
22
25
  end
26
+
27
+ def oneshot_finished(_containers)
28
+ end
29
+
30
+ private
31
+
32
+ def configure(_options)
33
+ end
23
34
  end
24
35
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hako
3
- VERSION = '0.11.2'
3
+ VERSION = '0.12.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hako
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kohei Suzuki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-17 00:00:00.000000000 Z
11
+ date: 2016-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk