.gitlab.yml
stages:
- test
- deploy
before_script:
- pip install virtualenv virtualenvwrapper
- source /home/gitlab-runner/.virtualenvs/sanic_test/bin/activate
- pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
- pip install -r requirements_dev.txt
- cp -r /home/devops/py/azkaban/scripts .
- cp /home/devops/py/azkaban/config.yml .
- chmod +x deploy.sh
- echo " 持续集成开始"
after_script:
- rm -rf scripts
test_job:
stage: test
script:
- pytest .
deploy-job:
stage: deploy
script:
- sh deploy.sh