2018-06-20 02:22:35 +00:00
|
|
|
sudo: required
|
2017-10-16 03:35:58 +00:00
|
|
|
language: node_js
|
|
|
|
node_js:
|
2018-06-19 22:22:18 +00:00
|
|
|
- "8.11.1"
|
|
|
|
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
# eventually set up AWS stuff here
|
2018-06-20 17:01:11 +00:00
|
|
|
- docker-compose -f docker-compose-development.yml up -d
|
2018-06-19 22:22:18 +00:00
|
|
|
- docker ps -a
|
|
|
|
|
2018-06-20 03:01:04 +00:00
|
|
|
install: true
|
|
|
|
|
2018-06-20 02:22:35 +00:00
|
|
|
script:
|
|
|
|
# Run unit tests in the app container
|
|
|
|
- docker-compose exec -T app npm run test --verbose
|
|
|
|
|
2018-06-20 17:01:11 +00:00
|
|
|
after_success:
|
2018-06-20 18:29:13 +00:00
|
|
|
# eventually wrap this in a if branch is master
|
2018-06-20 17:01:11 +00:00
|
|
|
- docker-compose stop
|
2018-06-20 18:29:13 +00:00
|
|
|
- docker-compose build --no-cache
|
|
|
|
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
2018-06-20 19:09:54 +00:00
|
|
|
- docker image ls
|
|
|
|
- docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:app_$TRAVIS_BUILD_ID
|
|
|
|
- docker tag $NGINX_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:nginx_$TRAVIS_BUILD_ID
|
|
|
|
- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:app_$TRAVIS_BUILD_ID
|
|
|
|
- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:nginx_$TRAVIS_BUILD_ID
|
2018-06-20 18:29:13 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
2018-06-20 20:34:09 +00:00
|
|
|
- APP_IMAGE_NAME=p5jswebeditor_app
|
|
|
|
- NGINX_IMAGE_NAME=p5jswebeditor_nginx
|