From 27b029587b24de6844b3bb09f8b482c0566496f7 Mon Sep 17 00:00:00 2001 From: Alexander Burdeiny Date: Wed, 27 Jul 2016 11:40:35 +0300 Subject: [PATCH] fabfile only --- fabfile.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/fabfile.py b/fabfile.py index 0aabeca2..1b2a0adb 100644 --- a/fabfile.py +++ b/fabfile.py @@ -176,6 +176,25 @@ def update_crontab(): run('python manage.py crontab add') +@ticket +def switch_to_stage4(): + with cd(REMOTE_HOME_DIR): + call_state('stop', only='apache2') + run('git fetch') + run('git checkout stage4') + run('git pull') + call_state('start', only='apache2') + +@ticket +def switch_to_stage5(): + with cd(REMOTE_HOME_DIR): + call_state('stop', only='apache2') + run('git fetch') + run('git checkout staget5') + run('git pull') + call_state('start', only='apache2') + + # def stage3_pre_final(): # with cd(REMOTE_HOME_DIR): # run('pip install pandas')