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

79 lines
1.7 KiB
YAML
Raw Normal View History

image: registry.gitlab.com/librespacefoundation/satnogs/satnogs-network:latest
stages:
- static
- build
- test
- deploy
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'
static_python:
stage: static
image: python:2.7
before_script:
- pip install tox
script:
- tox -e flake8
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:
stage: test
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:
- tox -e deps,pytest
stage:
stage: deploy
environment: stage
only:
- dev@librespacefoundation/satnogs/satnogs-network
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
- 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@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
- git push -u ssh://$SERVER_USER@$SERVER_HOST$SERVER_PATH master