aboutsummaryrefslogtreecommitdiff
path: root/control/deploy-control-node
blob: 1472cf7e0ee71592ae0623e4079decb99150c190 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
###############################################################################
# Copyright (c) 2011 Linaro
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
###############################################################################
#
# This scripts deploys updates to master node
# of linaro-cloud-buildd infrastructure
#

set -e
TSTAMP=`date '+%Y%m%dT%H%M'`

function header() {
    echo "======================================"
    echo $1
    echo "======================================"
}

header "Deploying linaro-android-mirror"
sudo kill `cat /home/git-mirror/service.pid`
sleep 2
bzr branch lp:linaro-android-mirror linaro-android-mirror.new
mv linaro-android-mirror linaro-android-mirror.$TSTAMP
mv linaro-android-mirror.new linaro-android-mirror
cd linaro-android-mirror
sudo -H -u git-mirror twistd -y mirror-service.tac --pid ~git-mirror/service.pid --logfile ~git-mirror/service.log