-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuildspec.yml
More file actions
36 lines (30 loc) · 1.02 KB
/
buildspec.yml
File metadata and controls
36 lines (30 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
version: 0.2
run-as: root
proxy:
upload-artifacts: yes
logs: yes
phases:
pre_build:
commands:
- REPO_FRONT=792939917746.dkr.ecr.ap-northeast-2.amazonaws.com/devkor-hackathon-front
- echo Logging in to Amazon ECR...
- aws --version
- $(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)
- IMAGE_TAG=release
- docker pull $REPO_FRONT:latest || true
build:
commands:
- docker build . -t devkor-hackathon-front -f ./Dockerfile
- docker tag devkor-hackathon-front:latest $REPO_FRONT:latest
- docker tag devkor-hackathon-front:latest $REPO_FRONT:$IMAGE_TAG
post_build:
commands:
- echo Build completed on `date`
- echo Pushing the Docker images...
- docker push $REPO_FRONT:latest
- docker push $REPO_FRONT:$IMAGE_TAG
- echo Writing image definitions file...
- printf '[{"name":"hackathon-frontend","imageUri":"%s"}]' $REPOSITORY_URI:$IMAGE_TAG > imagedefinitions.json
artifacts:
files:
- imagedefinitions.json