eb-docker-deploy 0.0.3 → 0.0.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: 6379c4f12298a7d09eedf590919db0fce8aebff4
4
- data.tar.gz: 11f9698d837b65612ee6903f24650ca6087c1eb3
3
+ metadata.gz: dcdf073505a1c8d779dfad1ef5e76221bea5e7c8
4
+ data.tar.gz: 7136c8372a618c15e839b867f48ad6c246030ad2
5
5
  SHA512:
6
- metadata.gz: e80b3f3b97a8abcd1a5ea4ee00c1a7a9338c70ff74d2cb17437e794f34256fd27af29c7cee5c5cbf4a372942ce9bfd4da151f7bae3562c744a2e5a5511a383c0
7
- data.tar.gz: 8f02a0def96b98042676cad4246d05faff2e6563bd6e0723f4dc7521c337db306fc25883fc42d6a9c66a11b94572b9cb30d589cc21ec6909478d8b27c2f49db9
6
+ metadata.gz: 58c18b5b0bc7f5c9f17f94cbc4acac0c4001b5ae3e6973b42de84f3c1fb2c90dee709cea36ee1b659e4d3785aeb257ee1cb076941ed8e9ed38c78407699f3710
7
+ data.tar.gz: 5ef170c6c8853dd9b44881b8f99a5dcc7f70a2558b92119b4b21b39de1d572ec2cc67c3a279219ba071afdb684e2ac3a4ae726cb20eaffe1cfbd68f17e538eb5
@@ -16,11 +16,11 @@ module Deploy
16
16
  version = options[:version]
17
17
  repo = ENV['DOCKER_REPO']
18
18
 
19
- shout 'Building Docker Image'
19
+ shout "Building Docker Image: #{repo}:#{version}"
20
20
  command = "docker build -t #{repo}:#{version} ."
21
21
  system(command)
22
22
 
23
- shout 'Tagging Latest Docker Image'
23
+ shout "Tagging #{version} Docker Image"
24
24
  command = "docker tag -f #{repo}:#{version} #{repo}:latest"
25
25
  system(command)
26
26
 
@@ -31,8 +31,26 @@ module Deploy
31
31
  command = "docker push #{repo}:latest"
32
32
  system(command)
33
33
 
34
- #command = "eb deploy -l #{version}"
35
- #system(command)
34
+ command = "eb deploy --label #{version}"
35
+ system(command)
36
+ end
37
+
38
+ method_option :version, aliases: '-v', desc: 'Version'
39
+ desc 'rollback', 'rollback'
40
+ def rollback
41
+ version = options[:version]
42
+ repo = ENV['DOCKER_REPO']
43
+
44
+ shout "Tagging #{version} Docker Image"
45
+ command = "docker tag -f #{repo}:#{version} #{repo}:latest"
46
+ system(command)
47
+
48
+ shout "Pushing Docker Image: #{repo}:latest"
49
+ command = "docker push #{repo}:latest"
50
+ system(command)
51
+
52
+ command = "eb deploy --version #{version}"
53
+ system(command)
36
54
  end
37
55
 
38
56
  no_commands do
@@ -1,3 +1,3 @@
1
1
  module Deploy
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eb-docker-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim