terra_boi 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3f586f964ace1990c78dd488bec9045c589493bb6a8d3bb76bd1184535d19927
|
|
4
|
+
data.tar.gz: 2d04e5da26bee200183935911f7b5a60820099750bd79ff17326378a52f05212
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd77679206ecc88ff7f9816494da339d7bdc5b6bf09a9ea3597f67fac2d1550723c5a857ead2b6c3a8265ce582e6cd716619e55c539d43a7f041aa9a1818f315
|
|
7
|
+
data.tar.gz: 283ca1f89860f934937a2f85c1389904936fd5512c11fa26a5dc0b17794227d4f7419e952423d7e5c01af3658be55197801808997e87bca116f22dc93f94836a
|
|
@@ -12,7 +12,11 @@ aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --
|
|
|
12
12
|
|
|
13
13
|
# Build your Docker image using the following command
|
|
14
14
|
DOCKERFILE_PATH="$SCRIPT_DIR/../../../."
|
|
15
|
-
docker build -t $AWS_ECR_REPO_NAME $DOCKERFILE_PATH
|
|
15
|
+
if ! docker build -t $AWS_ECR_REPO_NAME $DOCKERFILE_PATH; then
|
|
16
|
+
echo "TERRA_BOI | Command failed. Pruning Docker memory then retrying!"
|
|
17
|
+
echo "TERRA_BOI | Pruning may take a couple minutes..."
|
|
18
|
+
docker system prune -a && docker build -t $AWS_ECR_REPO_NAME $DOCKERFILE_PATH
|
|
19
|
+
fi
|
|
16
20
|
|
|
17
21
|
# After the build completes, tag your image so you can push the image to this repository:
|
|
18
22
|
docker tag $AWS_ECR_REPO_NAME:latest $AWS_ECR_REPO_URL:latest
|
|
@@ -22,15 +22,15 @@ namespace :terra_boi do
|
|
|
22
22
|
ENVS = get_envs(args)
|
|
23
23
|
|
|
24
24
|
create_boilerplate_files
|
|
25
|
-
apply_terraform_state
|
|
26
|
-
apply_terraform_cert
|
|
27
|
-
apply_ecr
|
|
28
|
-
apply_data
|
|
29
|
-
push_container_to_ecr
|
|
30
|
-
apply_web_app_and_worker
|
|
31
|
-
puts_urls_for_alb
|
|
32
|
-
puts_how_to_connect_domain_and_load_balancer
|
|
33
|
-
puts_twitter_plug
|
|
25
|
+
# apply_terraform_state
|
|
26
|
+
# apply_terraform_cert
|
|
27
|
+
# apply_ecr
|
|
28
|
+
# apply_data
|
|
29
|
+
# push_container_to_ecr
|
|
30
|
+
# apply_web_app_and_worker
|
|
31
|
+
# puts_urls_for_alb
|
|
32
|
+
# puts_how_to_connect_domain_and_load_balancer
|
|
33
|
+
# puts_twitter_plug
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
desc """
|
|
@@ -155,13 +155,7 @@ end
|
|
|
155
155
|
|
|
156
156
|
def push_container_to_ecr
|
|
157
157
|
puts "\nTERRA_BOI | Building application docker container then pushing to ECR...\n".cyan.bold
|
|
158
|
-
sh "./terraform/lib/scripts/push_to_ecr.sh"
|
|
159
|
-
if !ok
|
|
160
|
-
puts "\nTERRA_BOI | Docker container build and push failed (status = #{res.exitstatus})".cyan.bold
|
|
161
|
-
puts "\nTERRA_BOI | Pruning docker (to create more memory) and retrying...\n".cyan.bold
|
|
162
|
-
sh "docker system prune -a && ./terraform/lib/scripts/push_to_ecr.sh"
|
|
163
|
-
end
|
|
164
|
-
end
|
|
158
|
+
sh "./terraform/lib/scripts/push_to_ecr.sh"
|
|
165
159
|
end
|
|
166
160
|
|
|
167
161
|
def apply_web_app_and_worker
|
data/lib/terra_boi/version.rb
CHANGED