try updating travis yaml again

This commit is contained in:
Cassie Tarakajian 2018-08-24 19:05:33 -04:00
parent 472bc0b425
commit 1493d3e5ae

View file

@ -6,26 +6,28 @@ node_js:
services: services:
- docker - docker
before_install: stages:
- docker-compose -f docker-compose-development.yml up -d - test
- docker ps -a - build
install: true jobs:
include:
script: - stage: test
# Run unit tests in the app container before_install:
- docker-compose exec -T app npm run test --verbose - docker-compose -f docker-compose-development.yml up -d
- docker ps -a
after_success: install: true
# build images script:
if: branch = master OR branch = production-docker # Run unit tests in the app container
- docker-compose stop - docker-compose exec -T app npm run test --verbose
- docker-compose build --no-cache - stage: build
- docker image ls if: branch = master OR branch = production-docker
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" env:
- docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest - APP_IMAGE_NAME=p5jswebeditor_app
- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest script:
- docker-compose stop
env: - docker-compose build --no-cache
global: - docker image ls
- APP_IMAGE_NAME=p5jswebeditor_app - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest
- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest