2017-08-24 12:48:20 -06:00
|
|
|
image: registry.gitlab.com/librespacefoundation/satnogs/satnogs-network:latest
|
|
|
|
|
|
|
|
stages:
|
2019-01-07 10:46:02 -07:00
|
|
|
- static
|
2019-01-07 10:49:12 -07:00
|
|
|
- build
|
2017-08-24 12:48:20 -06:00
|
|
|
- test
|
2017-08-27 09:17:58 -06:00
|
|
|
- deploy
|
2019-01-07 10:46:02 -07:00
|
|
|
static_js_css:
|
|
|
|
stage: static
|
|
|
|
image: node
|
|
|
|
script:
|
|
|
|
- npm install -g eslint stylelint
|
|
|
|
- eslint 'network/static/js/*.js'
|
|
|
|
- stylelint 'network/static/css/*.css' 'network/static/css/*.scss'
|
2019-01-07 10:47:36 -07:00
|
|
|
static_python:
|
|
|
|
stage: static
|
|
|
|
image: python:2.7
|
|
|
|
before_script:
|
|
|
|
- pip install tox
|
|
|
|
script:
|
|
|
|
- tox -e flake8
|
2019-01-07 10:49:12 -07:00
|
|
|
build:
|
|
|
|
stage: build
|
|
|
|
image: python:2.7
|
|
|
|
script:
|
|
|
|
- rm -rf dist
|
|
|
|
- python setup.py sdist bdist_wheel
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- dist
|
|
|
|
build3:
|
|
|
|
stage: build
|
|
|
|
image: python:3.6
|
|
|
|
script:
|
|
|
|
- rm -rf dist
|
|
|
|
- python setup.py sdist bdist_wheel
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- dist
|
2017-08-23 09:45:55 -06:00
|
|
|
test:
|
2017-08-24 12:48:20 -06:00
|
|
|
stage: test
|
2019-01-23 12:41:53 -07:00
|
|
|
image: python:2.7
|
|
|
|
before_script:
|
|
|
|
- pip install tox
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -y ruby-sass
|
2017-08-23 09:45:55 -06:00
|
|
|
script:
|
2019-01-23 12:41:53 -07:00
|
|
|
- tox -e deps,pytest
|
2017-08-27 09:17:58 -06:00
|
|
|
|
|
|
|
stage:
|
|
|
|
stage: deploy
|
|
|
|
environment: stage
|
|
|
|
only:
|
2019-01-07 09:18:41 -07:00
|
|
|
- dev@librespacefoundation/satnogs/satnogs-network
|
2017-08-27 09:17:58 -06:00
|
|
|
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:
|
2019-01-07 09:18:41 -07:00
|
|
|
- master@librespacefoundation/satnogs/satnogs-network
|
2017-08-27 12:25:00 -06:00
|
|
|
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
|