ops_deploy 0.1.8.3 → 0.1.8.4

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: f982c964034710b65572b3ea37c1787eec0a0fd7
4
- data.tar.gz: d9d586c32696fd1665771048f81076009c3ddaf7
3
+ metadata.gz: 5102cf39c639b4632234d7046c4578fe64f6375e
4
+ data.tar.gz: 6d3ac1074e8788c01efe04b783f1faa257e1b1f6
5
5
  SHA512:
6
- metadata.gz: 35cb437678df6c7f21afc1d94a3d452995299c32f2549a234f41e11c5cec69ccd15aa491b2f613af385dc4b4e82c881adc39b079bf8c064ec9f0d439d1c05f3e
7
- data.tar.gz: a1e2eaa8072f5e2b7273a1ee0ef5ac6bc7bd47919a8dc134ee26523f685afb9761e1533810bf9d6bc6487d8d9d3a40438d2e662b54745f0914cf803616da488c
6
+ metadata.gz: cf75ff37b32e8e15922bc1422048c4afd785323fb71d8df15370f5130eeed184d2930e8e92566d2d450a0728b5b40fd8016c9b7060f751fc35b57237155f339b
7
+ data.tar.gz: 005b51906d84d44dfce7ee01af43a68f1869d475ab3abae2e9ff4f02a5e2252942784af6d6c6e5423e5df0eb5b7a4877dd89b1923106596abeacd20d1a30138f
data/README.md CHANGED
@@ -71,3 +71,33 @@ Output:
71
71
  ✓ Response from rails-app1: 200 OK
72
72
  // Response check finished
73
73
  ```
74
+
75
+ If you want to post info about the latest commit to slack:
76
+ WARNING: This posts the latest commit in the current local git branch, not the latest one on github
77
+
78
+ ```shell
79
+ opsdeploy deploy wait check --stack="Example" --aws-region="us-east-1" --post-latest-commit=true
80
+ ```
81
+
82
+ Output:
83
+
84
+ ```
85
+ -> Getting stack 'Example'...
86
+ -> Found stack 'Example' (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
87
+ -> Latest commit: commit b5fed5c32df0613df06a8e1452d194cafabc22bc
88
+ Author: Martin Morava <martin.morava@example.com>
89
+ Date: Tue Aug 9 11:49:56 2016 +0200
90
+
91
+ Enable Slack notifications about the latest commit
92
+ -> Starting deployment on stack 'Example'...
93
+ ✓ Deployment started on stack 'Example'
94
+ -> Checking deployments...
95
+ -> Waiting for deployments to finish...
96
+ ..............................................................
97
+ ✓ Deployment OK (58s)
98
+ // Deployments finished
99
+ -> Checking instances' HTTP response...
100
+ .
101
+ ✓ Response from rails-app1: 200 OK
102
+ // Response check finished
103
+ ```
@@ -18,8 +18,10 @@ else
18
18
  check_via_proxy = OpsDeploy::CLI.argument('check-via-proxy')
19
19
  wait = OpsDeploy::CLI.argument('wait')
20
20
  wait_via_proxy = OpsDeploy::CLI.argument('wait-via-proxy')
21
+ post_latest_commit = OpsDeploy::CLI.argument('post-latest-commit')
21
22
 
22
23
  cli.start_deployment(stack, app_id, migrate) if deploy
24
+ cli.post_latest_commit(stack) if post_latest_commit
23
25
  cli.wait_for_deployments(stack, wait_via_proxy) if wait || wait_via_proxy
24
26
  cli.check_instances(stack, check_via_proxy) if check || check_via_proxy
25
27
  end
@@ -33,6 +33,13 @@ class OpsDeploy::CLI
33
33
  @notification_failure = false
34
34
  end
35
35
 
36
+ def post_latest_commit(stack_id_name_or_object)
37
+ stack = find_stack(stack_id_name_or_object)
38
+ latest_commit_description = `git log -1 --pretty=medium`
39
+ step_msg('Latest commit: ', latest_commit_description)
40
+ send_notification(stack)
41
+ end
42
+
36
43
  def start_deployment(stack_id_name_or_object, application_id = nil, migrate = false)
37
44
  stack = find_stack(stack_id_name_or_object)
38
45
 
@@ -1,3 +1,3 @@
1
1
  class OpsDeploy
2
- VERSION = '0.1.8.3'
2
+ VERSION = '0.1.8.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.3
4
+ version: 0.1.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mahdi Bchetnia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-09 00:00:00.000000000 Z
11
+ date: 2016-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk