-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
43 lines (37 loc) · 1.75 KB
/
Copy path.travis.yml
File metadata and controls
43 lines (37 loc) · 1.75 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
37
38
39
40
41
42
43
language: generic
#Anytime we use docker, we're using ourselves super user permissions
sudo: required
services:
#telling travis CI to automatically install a copy of docker into our running container
- docker
before_install:
#below is the command that should be executed to build our docker image using Dockerfile.dev in our current working directory using "."
#also providing it a tag name using -t of "hjmok/react-test" so we don't have to worry about a long ID. Instead of using "." to specify our current directory, we're saying look inside client directory to get build context
- docker build -t hjmok/react-test -f ./client/Dockerfile.dev ./client
#script section contains all the commands needed to run the test suites
script:
- docker run -e CI=true hjmok/react-test npm test
#after_success section has the configuration that's going to build the production version of all our projects and push them to Docker Hub
after_success:
- docker build -t hjmok/multi-client ./client
- docker build -t hjmok/multi-nginx ./nginx
- docker build -t hjmok/multi-server ./server
- docker build -t hjmok/multi-worker ./worker
#Log in to the Docker CLI
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_ID" --password-stdin
#Now we're going to take the images built above and push them to Docker Hub
- docker push hjmok/multi-client
- docker push hjmok/multi-nginx
- docker push hjmok/multi-server
- docker push hjmok/multi-worker
deploy:
provider: elasticbeanstalk
region: "us-east-2"
app: "multi-docker"
env: "MultiDocker-env"
bucket_name: "elasticbeanstalk-us-east-2-909807248326"
bucket_path: "docker-multi"
on:
branch: master
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_SECRET_KEY