1
0
Fork 0
satnogs-network/.gitlab-ci.yml

40 lines
957 B
YAML
Raw Normal View History

image: registry.gitlab.com/librespacefoundation/satnogs/satnogs-network:latest
stages:
- test
- deploy
2017-08-23 09:45:55 -06:00
test:
stage: test
2017-08-23 09:45:55 -06:00
script:
- pip install --no-cache-dir --require-hashes --no-deps -r /app/requirements/dev.txt
- cp env-dist .env
2017-08-23 09:45:55 -06:00
- flake8 .
- pytest
- eslint 'network/static/js/*.js'
- stylelint 'network/static/css/*.css'
stage:
stage: deploy
environment: stage
only:
- dev
script:
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa
- chmod -R u=rwX,o=,g= ~/.ssh/
- echo "$SSH_SERVER_HOSTKEY" > ~/.ssh/known_hosts
- git push ssh://$SERVER_USER@$SERVER_HOST$SERVER_PATH dev
2017-08-27 12:25:00 -06:00
stage:
stage: deploy
environment: production
only:
- master
script:
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa
- chmod -R u=rwX,o=,g= ~/.ssh/
- echo "$SSH_SERVER_HOSTKEY" > ~/.ssh/known_hosts
- git push ssh://$SERVER_USER@$SERVER_HOST$SERVER_PATH master