diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2017-05-22 21:48:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@automotivelinux.org> | 2017-05-22 21:48:16 +0000 |
commit | 4e4dcbc9464ab69208f528284afff50f10118d2d (patch) | |
tree | 101360879f796f99be50e8d2819f92d079c7bc88 /jjb/release-jjb-dab-snapshot/include-release-jjb-dab-snapshot-rsync.sh | |
parent | cc72775beaf3e354b61390f5a366359e08574528 (diff) | |
parent | 85d08f0f8158741a15b4178bc7797ecd9bf9de35 (diff) |
Merge "Add release job for a DD snapshot build."
Diffstat (limited to 'jjb/release-jjb-dab-snapshot/include-release-jjb-dab-snapshot-rsync.sh')
-rw-r--r-- | jjb/release-jjb-dab-snapshot/include-release-jjb-dab-snapshot-rsync.sh | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/jjb/release-jjb-dab-snapshot/include-release-jjb-dab-snapshot-rsync.sh b/jjb/release-jjb-dab-snapshot/include-release-jjb-dab-snapshot-rsync.sh new file mode 100644 index 00000000..50944a8f --- /dev/null +++ b/jjb/release-jjb-dab-snapshot/include-release-jjb-dab-snapshot-rsync.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +#set -x +set -e +echo "#######################################" +echo "#######################################" +ls -alh +echo "#######################################" +echo "#######################################" +tree -L 2 +echo "#######################################" +echo "#######################################" +set | grep MACHINE +echo "#######################################" +echo "#######################################" +set +echo "#######################################" +echo "#######################################" + +cd repoclone/output + +export REMOTEDST="/srv/download/AGL/upload/ci/${RELEASE_BRANCH}/${RELEASE_VERSION}/" +export RSYNCDST="jenkins-slave@10.30.72.8:${REMOTEDST}" +export RSYNCSRC=$(pwd)/UPLOAD/ + +# construct upload folder +mv UPLOAD UPLOAD2 || true +rm -rf UPLOAD2 || true +mkdir -p UPLOAD/${MACHINE} +export DEST=$(pwd)/UPLOAD/${MACHINE} + +# save space ... remove the rpms +rm -rf tmp/deploy/rpm || true + +rsync -avr --progress --delete tmp/deploy $DEST/ +rsync -avr --progress --delete tmp/log $DEST/ + +cp ../../current_default.xml $DEST/${MACHINE}_repo_default.xml +cp conf/local.conf $DEST/local.conf +cp conf/auto.conf $DEST/auto.conf +echo "$BUILD_URL" > $DEST/jenkins.build.url + +tree $DEST + +ls -alhR $DEST + +echo "would do rsync -avr -e \"ssh -o StrictHostKeyChecking=no\" $RSYNCSRC $RSYNCDST " + +if test x"yes" = x"$UPLOAD" ; then + ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 mkdir -p ${REMOTEDST} + rsync -avr -e "ssh -o StrictHostKeyChecking=no" $RSYNCSRC $RSYNCDST +fi + +exit 0
\ No newline at end of file |