aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2014-01-15 19:32:42 +0200
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2014-01-15 19:32:42 +0200
commitf36e232da5745bdb4b518a56b6dc9953d0c9892d (patch)
treeb8f75d1c35b4f764b22448734746d36145d20c27
parentb1979204c9ef9d468e358d153ce9dd38d49d8d31 (diff)
downloadl-a-b-VPS-f36e232da5745bdb4b518a56b6dc9953d0c9892d.tar.gz
Deploy linaro-android-frontend from git.
Change-Id: If3c9a397b7ec8ed3e848dcaff2ceb648fb9c39eb
-rwxr-xr-xcontrol/deploy-control-node19
-rwxr-xr-xcontrol/setup-control-node2
2 files changed, 19 insertions, 2 deletions
diff --git a/control/deploy-control-node b/control/deploy-control-node
index 0fd6c8a..53bdb73 100755
--- a/control/deploy-control-node
+++ b/control/deploy-control-node
@@ -35,6 +35,22 @@ function bzr_deploy() {
sudo chown -R $owner $deploy_dir-r$revno-$TSTAMP
}
+function git_deploy() {
+ repo=$1
+ branch=$2
+ deploy_dir=$3
+ owner=$4
+ if [ -e $deploy_dir -a ! -h $deploy_dir ]; then
+ sudo mv $deploy_dir $deploy_dir.old
+ fi
+ git clone $repo /tmp/$deploy_dir.new
+ sudo mv /tmp/$deploy_dir.new $deploy_dir.new
+ sudo mv $deploy_dir.new $deploy_dir-$TSTAMP
+ sudo ln -sfn $deploy_dir-$TSTAMP $deploy_dir
+ sudo chown -R $owner $deploy_dir-$TSTAMP
+}
+
+
# be sure to execute in deployment dir
cd
@@ -59,7 +75,8 @@ function deploy_frontend() {
header "Deploying linaro-android-frontend"
sudo service apache2 stop
cd ~build-system-frontend
- bzr_deploy ${FRONTEND_BRANCH:-"lp:linaro-android-frontend"} frontend build-system-frontend
+ git_deploy http://git.linaro.org/git/infrastructure/linaro-android-frontend.git \
+ ${FRONTEND_BRANCH:-"master"} frontend build-system-frontend
(cd frontend; sudo -u build-system-frontend make)
sudo -u build-system-frontend ln -s ../settings_prod.py frontend/
sudo service apache2 start
diff --git a/control/setup-control-node b/control/setup-control-node
index b92a05d..4f8b922 100755
--- a/control/setup-control-node
+++ b/control/setup-control-node
@@ -261,7 +261,7 @@ sudo $MYPATH/set-jenkins-user-passwd \
sudo -H -u build-system-frontend bash -xes <<\EOF
cd
rm -rf frontend
-bzr branch lp:linaro-android-frontend frontend
+git clone http://git.linaro.org/git/infrastructure/linaro-android-frontend.git frontend
cd frontend
make
KEY="$(openssl rand 30 | base64 -w0)"