2011-11-09 18:22:23 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2011-11-11 04:07:33 +00:00
|
|
|
# this script is used by jenkins to remotely update a regluit instance
|
|
|
|
# for it to work the jenkins user's public ssh key needs to be in the
|
|
|
|
# authorized key for the machine running the regluit instance
|
|
|
|
# you can then put something like this in a post build configuration
|
|
|
|
# ssh ubuntu@please.unglueit.com "/opt/regluit/deploy/update-regluit"
|
2011-11-09 18:22:23 +00:00
|
|
|
|
|
|
|
cd /opt/regluit
|
2011-11-11 04:07:33 +00:00
|
|
|
sudo -u ubuntu /usr/bin/git pull
|
2011-11-09 18:22:23 +00:00
|
|
|
source ENV/bin/activate
|
2012-01-26 15:53:59 +00:00
|
|
|
#pip install -r requirements.pip
|
|
|
|
django-admin.py syncdb --migrate --settings regluit.settings.please
|
|
|
|
django-admin.py collectstatic --noinput --settings regluit.settings.please
|
2011-11-09 18:22:23 +00:00
|
|
|
sudo /etc/init.d/apache2 restart
|
|
|
|
sudo /etc/init.d/celeryd restart
|
2012-04-05 21:48:30 +00:00
|
|
|
sudo /etc/init.d/celerybeat restart
|
2011-11-11 03:41:25 +00:00
|
|
|
touch /opt/regluit/deploy/last-update
|