summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Hart <matthew.hart@linaro.org>2015-06-01 13:53:55 +0100
committerMatt Hart <matthew.hart@linaro.org>2015-06-01 13:56:01 +0100
commitcc02ade58c98861ac69038ccec30226020d0d494 (patch)
treea927d508c171474ad34017e28b3598d4022f650f
parentefb1ba770d8293b077461934647015d3f2f9dd1e (diff)
Migrated jenkins-config to dev-private
The jenkis-config-* repos have been moved to the dev-private-git server so this script needs updating to match. Change-Id: I5148071d7408156c3a95e585cbc06b2070a8b0fc
-rwxr-xr-xgit-backup/backup.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-backup/backup.sh b/git-backup/backup.sh
index a30abe9..718e58f 100755
--- a/git-backup/backup.sh
+++ b/git-backup/backup.sh
@@ -8,6 +8,7 @@ SSH_OPTS=""
# Auth proxy (-A) is mandatory for push access
SSH_AUTH="-A"
SSH="ssh $SSH_OPTS"
+GIT_URL_BASE="dev-private-git.linaro.org/systems/jenkins-config-"
function usage () {
echo "Usage: $0 <user> <host> status|diff|commit|push"
@@ -61,11 +62,11 @@ elif [ "$cmd" = "commit-users" ]; then
fi
echo "Users are now commited, but not pushed. Run $0 $1 $2 push"
elif [ "$cmd" = "push" ]; then
- gituser="$1"
+ gituser="git"
if [ "$4" != "" ]; then
gituser="$4"
fi
- $SSH $SSH_AUTH $HOST "cd /var/lib/jenkins; git push ssh://$gituser@linaro-private.git.linaro.org/srv/linaro-private.git.linaro.org/linaro-infrastructure/jenkins-config-$2.git master"
+ $SSH $SSH_AUTH $HOST "cd /var/lib/jenkins; git push ssh://${gituser}@${GIT_URL_BASE}${2}.git master"
elif [ "$cmd" = "ssh" ]; then
$SSH $SSH_AUTH $HOST
else