mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
- Looking at our releases, https://github.com/Human-Connection/Human-Connection/releases, the ones created from our build server, are not sufficient. As part of the deploy process, I have been manually creating the Releases in Github, using our CHANGELOG.md.... I propose we remove this script from our build server, as it's now breaking our master build and it's not being used.
72 lines
2.3 KiB
YAML
72 lines
2.3 KiB
YAML
dist: xenial
|
|
language: generic
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- libgconf-2-4
|
|
snaps:
|
|
- docker
|
|
|
|
install:
|
|
- yarn global add wait-on
|
|
# Install Codecov
|
|
- yarn install
|
|
- cp backend/.env.template backend/.env
|
|
|
|
before_script:
|
|
- docker-compose -f docker-compose.yml build --parallel
|
|
- docker-compose -f docker-compose.yml -f docker-compose.build-and-test.yml build # just tagging, just be quite fast
|
|
- docker-compose -f docker-compose.yml -f docker-compose.build-and-test.yml up -d
|
|
- wait-on http://localhost:7474
|
|
- docker-compose -f docker-compose.yml -f docker-compose.build-and-test.yml exec backend yarn run db:migrate init
|
|
|
|
script:
|
|
- export CYPRESS_RETRIES=1
|
|
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
|
|
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
|
|
# Backend
|
|
- docker-compose exec backend yarn run lint
|
|
- docker-compose exec backend yarn run test --ci --verbose=false --coverage
|
|
- docker-compose exec backend yarn run db:seed
|
|
- docker-compose exec backend yarn run db:reset
|
|
# Frontend
|
|
- docker-compose exec webapp yarn run lint
|
|
- docker-compose exec webapp yarn run test --ci --verbose=false --coverage
|
|
# Fullstack
|
|
- docker-compose down
|
|
- docker-compose -f docker-compose.yml up -d
|
|
- wait-on http://localhost:7474
|
|
- yarn run cypress:run --record
|
|
- yarn run cucumber
|
|
# Coverage
|
|
- yarn run codecov
|
|
|
|
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
|
|
wget https://raw.githubusercontent.com/Human-Connection/Discord-Bot/develop/tester.sh &&
|
|
chmod +x tester.sh &&
|
|
./tester.sh staging $WEBHOOK_URL;
|
|
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
|
|
|
|
before_deploy:
|
|
- go get -u github.com/tcnksm/ghr
|
|
- ./scripts/setup_kubernetes.sh
|
|
|
|
deploy:
|
|
- provider: script
|
|
script: bash scripts/docker_push.sh
|
|
on:
|
|
branch: master
|
|
- provider: script
|
|
script: bash scripts/deploy.sh
|
|
on:
|
|
branch: master
|