-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (34 loc) · 1.25 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
38
39
40
sudo: required
services:
- docker
# Here we could build a lot of other containers that we would like to runt test
before_install:
- docker build -t rinorsadiku/react-test -f ./client/Dockerfile.dev ./client
# Run all the other build containers here
script:
- docker run -e CI=true rinorsadiku/react-test npm run test -- --coverage
# Here we will add the configuration to build the prod image after the tests have passed
after_success:
- docker build -t rinorsadiku/multi-client ./client
- docker build -t rinorsadiku/multi-server ./server
- docker build -t rinorsadiku/multi-worker ./worker
- docker build -t rinorsadiku/multi-nginx ./nginx
# Log in to the docker CLI
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_ID" --password-stdin
# Take those images and push them to docker hub
- docker push rinorsadiku/multi-client
- docker push rinorsadiku/multi-server
- docker push rinorsadiku/multi-worker
- docker push rinorsadiku/multi-nginx
deploy:
provider: elasticbeanstalk
region: eu-central-1
app: multi-docker
env: MultiDocker-env
bucket_name: elasticbeanstalk-eu-central-1-117778104912
bucker_path: docker-multi
on:
branch: master
access_key_id: $AWS_ACCESS_KEY
secret_access_key:
secure: '$AWS_SECRET_KEY'