-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
27 lines (25 loc) · 731 Bytes
/
.travis.yml
File metadata and controls
27 lines (25 loc) · 731 Bytes
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
language: node_js
node_js:
- 12
env:
global:
- APP_NAME=carrygo-server
- AWS_ECR_ACCOUNT=768136700677
- AWS_REGION=us-east-2
services:
- mongodb
- docker
cache: npm
branches:
only:
- main
script:
- docker --version # document the version travis is using
- pip install --user awscli # install aws cli w/o sudo
- export PATH=$PATH:$HOME/.local/bin # put aws in the path
- eval $(aws ecr get-login --region $AWS_REGION --no-include-email)
- docker build -t $APP_NAME .
- docker tag $APP_NAME $AWS_ECR_ACCOUNT.dkr.ecr.us-east-2.amazonaws.com/$APP_NAME
# - docker push $AWS_ECR_ACCOUNT.dkr.ecr.us-east-2.amazonaws.com/$APP_NAME
after_success:
- echo "Successfully built and pushed the image"