2017-08-24 12:48:20 -06:00
|
|
|
image: registry.gitlab.com/librespacefoundation/satnogs/satnogs-network:latest
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- test
|
2017-08-27 09:17:58 -06:00
|
|
|
- deploy
|
2017-08-23 09:45:55 -06:00
|
|
|
|
|
|
|
test:
|
2017-08-24 12:48:20 -06:00
|
|
|
stage: test
|
2017-08-23 09:45:55 -06:00
|
|
|
script:
|
2018-12-14 07:57:05 -07:00
|
|
|
- pip install --no-cache-dir -r requirements/dev.txt
|
2017-08-27 09:17:58 -06:00
|
|
|
- cp env-dist .env
|
2017-08-23 09:45:55 -06:00
|
|
|
- flake8 .
|
|
|
|
- pytest
|
|
|
|
- eslint 'network/static/js/*.js'
|
|
|
|
- stylelint 'network/static/css/*.css'
|
2017-12-24 12:15:03 -07:00
|
|
|
- stylelint 'network/static/css/*.scss'
|
2017-08-27 09:17:58 -06:00
|
|
|
|
|
|
|
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
|
2018-03-07 07:06:42 -07:00
|
|
|
- git checkout dev
|
2017-09-14 00:42:03 -06:00
|
|
|
- git push -u ssh://$SERVER_USER@$SERVER_HOST$SERVER_PATH dev
|
2017-08-27 12:25:00 -06:00
|
|
|
|
2017-08-27 12:26:21 -06:00
|
|
|
production:
|
2017-08-27 12:25:00 -06:00
|
|
|
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
|
2018-03-07 07:06:42 -07:00
|
|
|
- git checkout master
|
2017-09-14 00:42:03 -06:00
|
|
|
- git push -u ssh://$SERVER_USER@$SERVER_HOST$SERVER_PATH master
|