http_stub_docker 0.1.0 → 0.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 164006e652b75d61f679a0cdb4fe0b79d2ec6401
|
4
|
+
data.tar.gz: 0fe3c173adfb10e2fadf3fcccb9f5400355242ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75ea68e3caad5085e84bab6e58ee7b716d121723ba06abef53ac0975216ec47c118902919e5bd77c0f066b0738f689b3483b0abf428fc3935284ceb301345577
|
7
|
+
data.tar.gz: e1147f0fd87367a32c26d5976cacd86bd0c292388ef5307c9779f35001592a9a5d3c28044c3a0cbbc882e5067e5ff68510aa1f815e24ef1edb9a190be31ebb31
|
@@ -2,10 +2,17 @@
|
|
2
2
|
|
3
3
|
set -e
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
if [ "$#" -lt 2 ]; then
|
6
|
+
echo "usage: $(basename "$0") NAME TAG [TAGS...]" && exit 1
|
7
|
+
fi
|
8
|
+
|
9
|
+
app_name="$1"
|
10
|
+
app_tags="${@:2}"
|
8
11
|
|
9
12
|
eval $(aws ecr get-login --region "$AWS_REGION")
|
10
|
-
|
11
|
-
|
13
|
+
IFS=' ' read -ra tags <<< "$app_tags"
|
14
|
+
for tag in "${tags[@]}"; do
|
15
|
+
image_tag="$AWS_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$app_name:$tag"
|
16
|
+
docker tag "$app_name" "$image_tag"
|
17
|
+
docker push "$image_tag"
|
18
|
+
done
|
@@ -7,7 +7,7 @@ module HttpStubDocker
|
|
7
7
|
|
8
8
|
private_constant :DEFAULT_PORT
|
9
9
|
|
10
|
-
attr_reader :configurer, :stub_name, :stub_dir, :port, :external_base_uri, :
|
10
|
+
attr_reader :configurer, :stub_name, :stub_dir, :port, :external_base_uri, :publish_tags, :task_prefix
|
11
11
|
|
12
12
|
def initialize(args)
|
13
13
|
@port = ENV["port"] || DEFAULT_PORT
|
@@ -40,7 +40,11 @@ module HttpStubDocker
|
|
40
40
|
def define_publish_task(args)
|
41
41
|
desc "Publishes the container"
|
42
42
|
task(publish: "#{args.task_prefix}docker:build") do
|
43
|
-
|
43
|
+
begin
|
44
|
+
sh "#{PUBLISH_SCRIPT} #{args.stub_name} #{args.publish_tags.join(" ")}"
|
45
|
+
rescue RuntimeError
|
46
|
+
raise "Error publishing container"
|
47
|
+
end
|
44
48
|
end
|
45
49
|
end
|
46
50
|
|