Skip to content
Snippets Groups Projects
.gitlab-ci.yml 541 B
Newer Older
Alex's avatar
Alex committed
stages:
  - tests
  - deploy

  
testing:
  image: "python:3.7"
  stage: tests
  before_script:
    - apt-get update -y
    - apt-get install -y libsasl2-dev libldap2-dev libssl-dev
    - python -m pip install -r requirements.txt
  script:
    - python -m pytest tests

deploy:
  stage: deploy
  only:
    - master
  script:
    - chmod +x ./setup_push.sh
    - ./setup_push.sh ssh://dokku@$VM_1:22/$APP_NAME master
    - if [ -z ${VM_2+x} ]; then echo "no VM_2 in this group"; else ./setup_push.sh ssh://dokku@$VM_2:22/$APP_NAME master; fi