Commit f87ac351 authored by Okhin's avatar Okhin

Need to recreate the env at each deployment

parent fe3a095d
Pipeline #1121 failed with stages
in 1 minute and 38 seconds
...@@ -17,14 +17,13 @@ job test python: ...@@ -17,14 +17,13 @@ job test python:
tags: [preprod] tags: [preprod]
only: only:
- master - master
artifacts:
paths:
- env
expire_in: 1 day
job build: job build:
script: script:
- virtualenv --python=python3 env
- source env/bin/activate - source env/bin/activate
- pip install django
- pip install coverage
- python setup.py develop - python setup.py develop
- cp picampaign/settings.py.sample picampaign/settings.py - cp picampaign/settings.py.sample picampaign/settings.py
- python manage.py collectstatic --noinput - python manage.py collectstatic --noinput
...@@ -49,7 +48,10 @@ job deploy preprod: ...@@ -49,7 +48,10 @@ job deploy preprod:
BASE_DIR: /srv/piphone/campaign BASE_DIR: /srv/piphone/campaign
script: script:
- rsync -ruvC ./ ${BASE_DIR} - rsync -ruvC ./ ${BASE_DIR}
- source /srv/piphone/campaign/env/bin/activate - virtualenv --python=python3 ${BASE_DIR}/env
- source ${BASE_DIR}?env/bin/activate
- pip install django
- pip install coverage
- python /srv/piphone/campaign/setup.py install - python /srv/piphone/campaign/setup.py install
- python /srv/piphone/campaign/manage.py migrate - python /srv/piphone/campaign/manage.py migrate
- python /srv/piphone/campaign/manage.py collectstatic --noinput - python /srv/piphone/campaign/manage.py collectstatic --noinput
...@@ -67,7 +69,9 @@ job deploy prod: ...@@ -67,7 +69,9 @@ job deploy prod:
BASE_DIR: /srv/piphone/campaign BASE_DIR: /srv/piphone/campaign
script: script:
- rsync -ruvC ./ ${BASE_DIR} - rsync -ruvC ./ ${BASE_DIR}
- source /srv/piphone/campaign/env/bin/activate - virtualenv --python=python3 ${BASE_DIR}/env
- pip install django
- pip install coverage
- python /srv/piphone/campaign/setup.py install - python /srv/piphone/campaign/setup.py install
- python /srv/piphone/campaign/manage.py migrate - python /srv/piphone/campaign/manage.py migrate
- python /srv/piphone/campaign/manage.py collectstatic --noinput - python /srv/piphone/campaign/manage.py collectstatic --noinput
......
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