mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-01-20 20:01:22 +00:00
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
language: node_js
|
|
node_js:
|
|
- "10"
|
|
cache:
|
|
yarn: true
|
|
directories:
|
|
- node_modules
|
|
services:
|
|
- docker
|
|
- neo4j
|
|
|
|
install:
|
|
- yarn install
|
|
- docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/nitro-backend:latest .
|
|
- cp .env.template .env
|
|
|
|
script:
|
|
- docker run humanconnection/nitro-backend:latest yarn run eslint
|
|
- yarn run db:reset
|
|
- 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
|
|
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then
|
|
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
|
|
docker tag humanconnection/nitro-backend humanconnection/nitro-backend:latest;
|
|
docker push humanconnection/nitro-backend:latest;
|
|
fi
|
|
|
|
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/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
|