shiprails 0.1.9 → 0.1.10
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 -5
- 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: 0ee7bd51be61d4b3ce92812299c11054c607cf63
|
4
|
+
data.tar.gz: 8d6de7fd6e03680eac37ea9f14d4b35ebc036136
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21c394cc17c4d0045a999b9d855b47c13e285a35a65c66c04bd4b2d80983968e29cd4e2932e84e7974b9b26d1afdd1201553e48e5d95716e5e087e9987121594
|
7
|
+
data.tar.gz: a4674f76b93e39d12d7ccc222e2b431dbf1bd39e3bfedd9e3ddd57015a8ab4719cae455477b995c63334378d11742de837d6c5e975cd4a593aae369eeccade19
|
@@ -16,7 +16,7 @@ module Shiprails
|
|
16
16
|
def check_git_status
|
17
17
|
if git.status.added.any? or git.status.changed.any? or git.status.deleted.any?
|
18
18
|
say "You have uncommitted changes. Commit and try again.", :red
|
19
|
-
|
19
|
+
exit
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -27,12 +27,12 @@ module Shiprails
|
|
27
27
|
configuration[:services].each do |service_name, service|
|
28
28
|
image_name = "#{compose_project_name}_#{service[:image]}"
|
29
29
|
service[:regions].each do |region_name, region|
|
30
|
-
aws_region = region_name.to_s
|
31
30
|
region[:environments].each do |environment_name|
|
32
31
|
next unless args.empty? or args.include?(environment_name)
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
s3 = Aws::S3::Client.new(region: region_name.to_s)
|
33
|
+
objects = s3.list_objects_v2(bucket: s3_config_bucket, prefix: environment_name)
|
34
|
+
s3_config_revision = objects.contents.map{ |object| object.key[/\d+/].to_i }.max || 0
|
35
|
+
commands << "docker build -t #{image_name}_#{environment_name} --build-arg AWS_ACCESS_KEY_ID='#{aws_access_key_id}' --build-arg AWS_SECRET_ACCESS_KEY='#{aws_access_key_secret}' --build-arg AWS_REGION='#{region_name.to_s}' --build-arg S3_CONFIG_BUCKET='#{s3_config_bucket}' --build-arg S3_CONFIG_ENVIRONMENT='#{environment_name}' --build-arg S3_CONFIG_REVISION='#{s3_config_revision}' -f Dockerfile.production ."
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
data/lib/shiprails/version.rb
CHANGED