.gitlab-ci.yml 840 Bytes
Newer Older
okhin's avatar
okhin committed
1 2 3
before_script:

job install:
4 5
  variables:
    BASE_PATH: /srv/piphone/sip-backend/
6
    VIRTUALENV: /srv/piphone/sip-backend/.sip-backend_env
7 8
  script:
    - rsync -ruvC ./ ${BASE_PATH}
9
    - sqlite3 ${BASE_PATH}/../backend_sip.sqlite3 < database.sql
10 11 12 13 14 15 16 17 18
    - source ${VIRTUALENV}/bin/activate
    - pip install --upgrade pip
    - pip install --upgrade -r requirements.txt
  stage: deploy
  tags: [preprod]
  only:
    - master

job production:
okhin's avatar
okhin committed
19
  variables:
20
    BASE_PATH: /srv/piphone/backend/
21
    VIRTUALENV: /srv/piphone/backend/backend-env
okhin's avatar
okhin committed
22
  script:
okhin's avatar
okhin committed
23
    - rsync -ruvC ./ ${BASE_PATH}
24
    - sqlite3 ${BASE_PATH}/../backend_sip.sqlite3 < database.sql
okhin's avatar
okhin committed
25 26 27
    - source ${VIRTUALENV}/bin/activate
    - pip install --upgrade pip
    - pip install --upgrade -r requirements.txt
28
  stage: deploy
29
  tags: [piphone]
okhin's avatar
okhin committed
30
  only:
okhin's avatar
okhin committed
31
    - master
32
  when: manual