diff options
author | 2017-05-30 22:14:30 +0200 | |
---|---|---|
committer | 2017-05-30 22:14:30 +0200 | |
commit | e282b61ffa7c8a7f465d9893d610fa329785785e (patch) | |
tree | 5a1b798087c931fb89328f458636329327179ff7 /jjb/release-jjb-dab-sources/include-release-jjb-dab-release-sources-rsync.sh | |
parent | 238771002532cd0ab24dbf10ad11942ca6094890 (diff) |
Release jobs for dab.
Change-Id: I4be4521171b15025488af09226dc8e82ec6cdf7a
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'jjb/release-jjb-dab-sources/include-release-jjb-dab-release-sources-rsync.sh')
-rw-r--r-- | jjb/release-jjb-dab-sources/include-release-jjb-dab-release-sources-rsync.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/jjb/release-jjb-dab-sources/include-release-jjb-dab-release-sources-rsync.sh b/jjb/release-jjb-dab-sources/include-release-jjb-dab-release-sources-rsync.sh new file mode 100644 index 00000000..9b40b5ac --- /dev/null +++ b/jjb/release-jjb-dab-sources/include-release-jjb-dab-release-sources-rsync.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +#set -x +set -e +#export RSYNCDST="jenkins-slave@10.30.72.8:/srv/download/AGL/release/${RELEASE_BRANCH}/${RELEASE_VERSION}/" +#export RSYNCSRC=$(pwd)/UPLOAD/ + +# construct upload folder + + +BRANCH=${RELEASE_BRANCH} +RELVER=${RELEASE_VERSION} + +rm -rf release-upload || true + +git clone -b ${RELEASE_BRANCH} https://gerrit.automotivelinux.org/gerrit/p/staging/release-upload.git +cd release-upload + +gpg --keyserver pgp.mit.edu --recv D6DD2170 + +ls | grep -q agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.tar.bz2 + +( gpg --verify agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.tar.bz2.sig agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.tar.bz2 2>&1 | grep -e "Good signature.*Jan-Simon.*Moeller.*AGL.*Release" -q && echo "gpg key verification succeeded" ) || ( echo "gpg key verification failed" && exit 1 ) + +rm -rf ../UPLOAD || true +mkdir -p ../UPLOAD/ + +cp -ar agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.* ../UPLOAD/ + +export RSYNCSRC=$(pwd)/../UPLOAD +export RSYNCDST="jenkins-slave@10.30.72.8:/srv/download/AGL/release/${RELEASE_BRANCH}/" + +if test x"yes" = x"${UPLOAD}" ; then + ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 "mkdir -p ${RSYNCDST}" + rsync -avr -e "ssh -o StrictHostKeyChecking=no" ${RSYNCSRC}/* ${RSYNCDST} +fi |