shiprails 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shiprails/ship/deploy.rb +5 -1
- data/lib/shiprails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc955dce4f735e2c919fba589d6ef5d3f46b9bf8
|
4
|
+
data.tar.gz: bfd7b26c2ded4810b1486e8400e41f96cb95da9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2f29c9b0be7fdadbba5c4e00149e203e7bb2ac470eda4a38d9d74c88203ccef78d9ed01cf2dd0a53591a333bcfa2f54f1a4c2c2d41517b77c8ca1db637413af
|
7
|
+
data.tar.gz: 96bb663b45334b95bbc6b23ea77a26eb351e29ba53c738242905b1f1842775f71caf087e71ff3d3ec74bf76c5e54782e3aa1fca3cf472023e9895539823c85ce
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "active_support/all"
|
2
2
|
require "aws-sdk"
|
3
|
+
require "base64"
|
3
4
|
require "git"
|
4
5
|
require "thor/group"
|
5
6
|
|
@@ -68,7 +69,10 @@ module Shiprails
|
|
68
69
|
end
|
69
70
|
end
|
70
71
|
repository_urls_to_regions.each do |repository_url, region|
|
71
|
-
|
72
|
+
ecr = Aws::ECR::Client.new({ region: region.to_s })
|
73
|
+
authorization_data = ecr.get_authorization_token.authorization_data.first
|
74
|
+
credentials = Base64.decode64(authorization_data.authorization_token).split(':')
|
75
|
+
run "docker login -u #{credentials.first} -p #{credentials.last} -e none #{authorization_data.proxy_endpoint}"
|
72
76
|
run "docker push #{repository_url}:#{git_sha}" # TODO: check that this succeeded
|
73
77
|
end
|
74
78
|
say "Push complete.", :green
|
data/lib/shiprails/version.rb
CHANGED