-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
44 lines (34 loc) · 1.81 KB
/
buildspec.yml
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
37
38
39
40
41
42
43
44
version: 0.2
phases:
install:
runtime-versions:
docker: 18
commands:
- npm install
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com
build:
commands:
- docker build -t omkargujar/react-test -f ./client/Dockerfile.dev ./client
- docker run -e CI=true omkargujar/react-test npm test
- docker build -t multi-docker/multi-client ./client
- docker tag multi-docker/multi-client:latest 154729512881.dkr.ecr.ap-south-1.amazonaws.com/multi-docker:client
- docker build -t multi-docker/multi-nginx ./nginx
- docker tag multi-docker/multi-nginx:latest 154729512881.dkr.ecr.ap-south-1.amazonaws.com/multi-docker:nginx
- docker build -t multi-docker/multi-server ./server
- docker tag multi-docker/multi-server:latest 154729512881.dkr.ecr.ap-south-1.amazonaws.com/multi-docker:server
- docker build -t multi-docker/multi-worker ./worker
- docker tag multi-docker/multi-worker:latest 154729512881.dkr.ecr.ap-south-1.amazonaws.com/multi-docker:worker
post_build:
commands:
- echo Pushing the Docker image...
- docker push 154729512881.dkr.ecr.ap-south-1.amazonaws.com/multi-docker:client
- docker push 154729512881.dkr.ecr.ap-south-1.amazonaws.com/multi-docker:nginx
- docker push 154729512881.dkr.ecr.ap-south-1.amazonaws.com/multi-docker:server
- docker push 154729512881.dkr.ecr.ap-south-1.amazonaws.com/multi-docker:worker
- #docker push omkargujar/multi-client
- #docker push omkargujar/multi-nginx
- #docker push omkargujar/multi-server
- #docker push omkargujar/multi-worker