Skip to content

Commit b48302b

Browse files
committed
Yet another attempt
1 parent f143b27 commit b48302b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ jobs:
1717
- run: set +o pipefail docker load -i /caches/app.tar | true
1818

1919
# Building.
20-
- run: docker build --build-arg ENV=development -t $DEV_AWS_ACCOUNT_ID.dkr.ecr.$DEV_AWS_REGION.amazonaws.com/community-app:$CIRCLE_SHA1 .
20+
- run: docker build --build-arg ENV=development --cache-from=$DEV_AWS_ACCOUNT_ID.dkr.ecr.$DEV_AWS_REGION.amazonaws.com/community-app -t $DEV_AWS_ACCOUNT_ID.dkr.ecr.$DEV_AWS_REGION.amazonaws.com/community-app .
2121

2222
# Updating the cache.
23-
- run: mkdir -p /caches && docker save -o /caches/app.tar $DEV_AWS_ACCOUNT_ID.dkr.ecr.$DEV_AWS_REGION.amazonaws.com/community-app:$CIRCLE_SHA1
23+
- run: mkdir -p /caches && docker save -o /caches/app.tar $DEV_AWS_ACCOUNT_ID.dkr.ecr.$DEV_AWS_REGION.amazonaws.com/community-app
2424
- save_cache:
2525
key: dev-docker-image-{{ checksum "package-lock.json" }}
2626
paths:
2727
- /caches/app.tar
2828

2929
# Deployment.
30-
- run: apt-get install python-dev python-pip
30+
- run: apk add --update py-pip
3131
- run: pip install awscli --upgrade --user
3232
- deploy:
33-
command: ./deploy.sh DEV $CIRCLE_SHA1
33+
command: ./deploy.sh DEV
3434

3535
# Test job for the cases when we do not need deployment. It just rapidly
3636
# installs (updates) app dependencies, and runs tests (ESLint, Stylelint,

deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
JQ="jq --raw-output --exit-status"
55

66
ENV=$1
7-
TAG=$2
7+
88
AWS_REGION=$(eval "echo \$${ENV}_AWS_REGION")
99
AWS_ECS_CLUSTER=$(eval "echo \$${ENV}_AWS_ECS_CLUSTER")
1010
ACCOUNT_ID=$(eval "echo \$${ENV}_AWS_ACCOUNT_ID")
@@ -75,13 +75,13 @@ make_task_def(){
7575
NODE_ENV=development
7676
fi
7777

78-
task_def=$(printf "$task_template" $ACCOUNT_ID $AWS_REGION $AWS_REPOSITORY $TAG $NODE_ENV $AWS_ECS_CLUSTER $AWS_REGION)
78+
task_def=$(printf "$task_template" $ACCOUNT_ID $AWS_REGION $AWS_REPOSITORY $NODE_ENV $AWS_ECS_CLUSTER $AWS_REGION)
7979
}
8080

8181
push_ecr_image() {
8282
echo "Pushing Docker Image..."
8383
eval $(aws ecr get-login --region $AWS_REGION)
84-
docker push $ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$AWS_REPOSITORY:$TAG
84+
docker push $ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$AWS_REPOSITORY
8585
echo "Docker Image published."
8686
}
8787

0 commit comments

Comments
 (0)