.gitlab-ci.yml 698 Bytes
Newer Older
okhin's avatar
okhin committed
1
before_script:
okhin's avatar
okhin committed
2
3
4
  - '[[ -d /srv/piphone/ ]] || mkdir -p /srv/piphone/'
  - 'which git || (apt-get update -yq && apt-get install git -yqq)'
  - 'which virtualenv || (apt-get update -yq && apt-get install python3-virtualenv -yqq)'
okhin's avatar
okhin committed
5
6
stages:
  - install
okhin's avatar
okhin committed
7
8
9

job install:
  script:
okhin's avatar
okhin committed
10
    - cd /srv/piphone/
okhin's avatar
okhin committed
11
    - if [[ -d $CI_PROJECT_NAME ]]; then cd $CI_PROJECT_NAME; git pull origin master; else git clone $CI_BUILD_REPO $CI_PROJECT_NAME; cd $CI_PROJECT_NAME; fi;
okhin's avatar
okhin committed
12
13
    - '[[ -d ./.backend_env ]] || virtualenv --python=python3 .backend_env'
    - source ./.backend_env/bin/activate
14
    - pip install -r ./requirements.txt
okhin's avatar
okhin committed
15
    - deactivate
okhin's avatar
okhin committed
16
  stage: install
okhin's avatar
okhin committed
17
18
19
20
  tags:
    - piphone
    - ssh
  only:
okhin's avatar
okhin committed
21
    - master