.gitlab-ci.yml 693 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
    - '[[ -d $CI_PROJECT_NAME ]] || git clone $CI_BUILD_REPO $CI_PROJECT_NAME && (cd $CI_PROJECT_NAME; git pull origin master)'
okhin's avatar
okhin committed
12
    - cd $CI_PROJECT_NAME
okhin's avatar
okhin committed
13 14
    - '[[ -d ./.backend_env ]] || virtualenv --python=python3 .backend_env'
    - source ./.backend_env/bin/activate
15
    - pip install -r ./requirements.txt
okhin's avatar
okhin committed
16
    - deactivate
okhin's avatar
okhin committed
17
  stage: install
okhin's avatar
okhin committed
18 19 20 21
  tags:
    - piphone
    - ssh
  only:
okhin's avatar
okhin committed
22
    - master