hackspace/.drone.yml

71 lines
1.6 KiB
YAML

workspace:
base: /drone
path: src
pipeline:
tests:
image: python:3.5
environment:
- PYTHONUSERBASE=/drone/src/cache/packages
- POSTGRES_USER=mhackspace
- USE_DOCKER=yes
- DJANGO_SETTINGS_MODULE=config.settings.test
commands:
- cp -n env.example .env
- mkdir -p ./cache/packages ./cache/pip
- pip install --user --cache-dir ./cache/pip -r ./requirements/test.txt
- python manage.py compilescss
- python manage.py collectstatic --no-input
- python manage.py test mhackspace --keepdb --verbosity 2
publish-test:
pull: True
image: appleboy/drone-ssh
host: stage.maidstone-hackspace.org.uk
user: root
secrets:
- source: DEPLOY_SSH_KEY
target: ssh_key
port: 22
command_timeout: 480
script:
- cd /var/www/maidstone-hackspace-website
- git pull
- docker-compose -fstage.yml build
- docker-compose -fstage.yml down --remove-orphans
- docker-compose -fstage.yml up -d
publish-live:
pull: True
image: appleboy/drone-ssh
user: root
secrets:
- source: DEPLOY_SSH_KEY
target: ssh_key
host: maidstone-hackspace.org.uk
port: 22
command_timeout: 480
script:
- echo 'to be added'
when:
event: [ tag ]
services:
mailhog:
image: mailhog/mailhog
node:
image: node:alpine
commands:
- npm --version
- npm install
bucket:
image: minio/minio
environment:
- MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE
- MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
commands:
- minio server /data &