try updating travis yaml again
This commit is contained in:
parent
472bc0b425
commit
1493d3e5ae
1 changed files with 24 additions and 22 deletions
20
.travis.yml
20
.travis.yml
|
@ -6,26 +6,28 @@ node_js:
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- test
|
||||||
|
- build
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
- stage: test
|
||||||
before_install:
|
before_install:
|
||||||
- docker-compose -f docker-compose-development.yml up -d
|
- docker-compose -f docker-compose-development.yml up -d
|
||||||
- docker ps -a
|
- docker ps -a
|
||||||
|
|
||||||
install: true
|
install: true
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Run unit tests in the app container
|
# Run unit tests in the app container
|
||||||
- docker-compose exec -T app npm run test --verbose
|
- docker-compose exec -T app npm run test --verbose
|
||||||
|
- stage: build
|
||||||
after_success:
|
|
||||||
# build images
|
|
||||||
if: branch = master OR branch = production-docker
|
if: branch = master OR branch = production-docker
|
||||||
|
env:
|
||||||
|
- APP_IMAGE_NAME=p5jswebeditor_app
|
||||||
|
script:
|
||||||
- docker-compose stop
|
- docker-compose stop
|
||||||
- docker-compose build --no-cache
|
- docker-compose build --no-cache
|
||||||
- docker image ls
|
- docker image ls
|
||||||
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
||||||
- docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest
|
- docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest
|
||||||
- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest
|
- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- APP_IMAGE_NAME=p5jswebeditor_app
|
|
||||||
|
|
Loading…
Reference in a new issue