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:
|
||||
- docker
|
||||
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: test
|
||||
before_install:
|
||||
- docker-compose -f docker-compose-development.yml up -d
|
||||
- docker ps -a
|
||||
|
||||
install: true
|
||||
|
||||
script:
|
||||
# Run unit tests in the app container
|
||||
- docker-compose exec -T app npm run test --verbose
|
||||
|
||||
after_success:
|
||||
# build images
|
||||
- stage: build
|
||||
if: branch = master OR branch = production-docker
|
||||
env:
|
||||
- APP_IMAGE_NAME=p5jswebeditor_app
|
||||
script:
|
||||
- docker-compose stop
|
||||
- docker-compose build --no-cache
|
||||
- docker image ls
|
||||
- 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
|
||||
|
||||
env:
|
||||
global:
|
||||
- APP_IMAGE_NAME=p5jswebeditor_app
|
||||
|
|
Loading…
Reference in a new issue