-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
48 lines (38 loc) · 1.44 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
41
42
43
44
45
46
47
48
sudo: required
services:
- docker
before_install:
- docker build -t scurrent/react-test -f ./client/Dockerfile.dev ./client
# look into the client directory to get the test context
script:
#if any exit with code other than 0 - travis will assume it failed.
# use the image we just created to run the tests
# - docker run scurrent/react-test npm test -- --watchAll=false
- docker run scurrent/react-test npm run test-coverage
after_success:
- docker build -t scurrent/multi-client ./client # no neet to specify dockerfile, it can use the default Dockerfile
- docker build -t scurrent/multi-nginx ./nginx
- docker build -t scurrent/multi-server ./server
- docker build -t scurrent/multi-worker ./worker
#now want to push them off to DockerHub
#log into the Docker CLI
# saved these values in travis ci as environment vars
- echo "$DOCKER_PASS" | docker login -u "$DOCKER_ID" --password-stdin
#gets the password, and added in to standard in (after the pipe)
- docker push scurrent/multi-client
- docker push scurrent/multi-nginx
- docker push scurrent/multi-server
- docker push scurrent/multi-worker
#adding deploy section for AWS
deploy:
provider: elasticbeanstalk
region: "us-east-1"
app: "multi-docker"
env: "MultiDocker-env"
bucket_name: "elasticbeanstalk-us-east-1-432378262638"
bucket_path: "docker-multi"
on:
branch: master
access_key_id: $AWS_ACCESS_KEY
secret_access_key:
secure: "$AWS_SECRET_KEY"