Commit d8146e32 authored by okhin's avatar okhin 🚴

Adding a dedicated script

parent da0d70bf
Pipeline #63 failed with stage
in 0 seconds
......@@ -7,12 +7,7 @@ stages:
job install:
script:
- cd /srv/piphone/
- 'git clone $CI_BUILD_REPO $CI_PROJECT_NAME || (cd ${CI_PROJECT_NAME} && git pull origin master)'
- cd $CI_PROJECT_NAME
- '[[ -d ./.backend_env ]] || virtualenv --python=python3 .backend_env'
- source ./.backend_env/bin/activate
- pip install -r ./requirements.txt
- ci/install.sh
- deactivate
stage: install
tags:
......
#!/usr/bin/bash
# This schript is used to setup what needs to be (virtualenv and stuff)
# before running the pthon setup.py part
# We need those variables
[[ -z "$CI_PROJECT_NAME" -o -z "$CI_BUILD_REPO" ]] && exit 1
cd /srv/piphone
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
if [ ! -d ./.${CI_PROJECT_NAME}_env ]
then
virtualenv --python=python3 .${CI_PROJECT_NAME}_env
fi
source .${CI_PROJECT_NAME}_env/bin/activate
pip install -r ./requirements.txt
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment