mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
It creates volumes and these volumns will change ownership and linux file permissions. That in turn will prevent Travis from removing those files and eventually crash the deployment.
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
language: node_js
|
|
node_js:
|
|
- "10"
|
|
cache:
|
|
yarn: true
|
|
directories:
|
|
- node_modules
|
|
services:
|
|
- docker
|
|
|
|
env:
|
|
- DOCKER_COMPOSE_VERSION=1.23.2
|
|
|
|
before_install:
|
|
- sudo rm /usr/local/bin/docker-compose
|
|
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
|
|
- chmod +x docker-compose
|
|
- sudo mv docker-compose /usr/local/bin
|
|
|
|
install:
|
|
- docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/nitro-backend:latest .
|
|
- docker-compose -f docker-compose.yml up -d
|
|
|
|
script:
|
|
- docker-compose exec backend yarn run ci
|
|
- docker-compose exec backend yarn run db:reset
|
|
- docker-compose exec backend yarn run db:seed
|
|
|
|
after_success:
|
|
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
|
|
- chmod +x send.sh
|
|
- ./send.sh success $WEBHOOK_URL
|
|
|
|
after_failure:
|
|
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
|
|
- chmod +x send.sh
|
|
- ./send.sh failure $WEBHOOK_URL
|
|
|
|
deploy:
|
|
- provider: script
|
|
script: scripts/docker_push.sh
|
|
on:
|
|
branch: master
|
|
- provider: script
|
|
script: scripts/deploy.sh nitro.human-connection.org
|
|
on:
|
|
branch: master
|
|
tags: true
|
|
- provider: script
|
|
script: scripts/deploy.sh nitro-staging.human-connection.org
|
|
on:
|
|
branch: master
|
|
- provider: script
|
|
script: scripts/deploy.sh "nitro-$(git rev-parse --short HEAD).human-connection.org"
|
|
on:
|
|
tags: true
|
|
all_branches: true
|