-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
37 lines (34 loc) · 1.21 KB
/
.travis.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
sudo: required
services:
- docker
before_install:
# look into the ./client to get the build context
- docker build -t ttanebatesdocker/react-test -f ./client/Dockerfile.dev ./client
script:
- docker run -e CI=true ttanebatesdocker/react-test npm run test -- --coverage
after_success:
- docker build -t ttanebatesdocker/multi-client ./client
- docker build -t ttanebatesdocker/multi-nginx ./nginx
- docker build -t ttanebatesdocker/multi-server ./server
- docker build -t ttanebatesdocker/multi-worker ./worker
# log in to the docker CLI
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_ID" --password-stdin
# take images above and push them to docker hub
- docker push ttanebatesdocker/multi-client
- docker push ttanebatesdocker/multi-nginx
- docker push ttanebatesdocker/multi-server
- docker push ttanebatesdocker/multi-worker
deploy:
provider: elasticbeanstalk
region: 'us-west-1'
app: 'multi-docker'
env: 'MultiDocker-env'
bucket_name: 'elasticbeanstalk-us-west-1-505975311648'
bucket_path: 'docker-multi'
on:
# only when code is pushed or merged to master, we deploy
branch: master
access_key_id:
secure: $AWS_ACCESS_KEY
secret_access_key:
secure: '$AWS_SECRET_KEY'