aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/release-jjb-jellyfish-sources/include-release-jjb-release-sources-rsync.sh
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-06-29 12:34:31 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-06-29 12:34:31 +0200
commit154d2b4db41b03c40c880b54b241f82102e99958 (patch)
treea54e5ae913ce6315e86849a068022bd2c55cd5dd /jjb/release-jjb-jellyfish-sources/include-release-jjb-release-sources-rsync.sh
parente3f8aef07fe8ea1dc9b22692ac19c6907ef88cfb (diff)
Update jenkins template for Jumping Jellyfish release
Add jobs for the JJ release. Bug-AGL: SPEC-3460 Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Change-Id: I0c104bdf97056cf52cf0f4e7fd9321cca24adf7c
Diffstat (limited to 'jjb/release-jjb-jellyfish-sources/include-release-jjb-release-sources-rsync.sh')
-rw-r--r--jjb/release-jjb-jellyfish-sources/include-release-jjb-release-sources-rsync.sh62
1 files changed, 62 insertions, 0 deletions
diff --git a/jjb/release-jjb-jellyfish-sources/include-release-jjb-release-sources-rsync.sh b/jjb/release-jjb-jellyfish-sources/include-release-jjb-release-sources-rsync.sh
new file mode 100644
index 00000000..ceac3acd
--- /dev/null
+++ b/jjb/release-jjb-jellyfish-sources/include-release-jjb-release-sources-rsync.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+#set -x
+set -e
+
+# construct upload folder
+
+
+BRANCH=${RELEASE_BRANCH}
+REVISION=${RELEASE_VERSION}
+
+
+rm -rf AGLRELEASE || true
+
+mkdir agl-${BRANCH}-${REVISION}
+pushd agl-${BRANCH}-${REVISION}
+
+repo init --reference=/opt/AGL/preclone -q -b ${GERRIT_BRANCH} -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo -m ${BRANCH}_${REVISION}.xml
+
+repo sync --force-sync
+
+repo manifest -r > ../${BRANCH}_${REVISION}.tar.xml
+
+rm -rf .repo
+find . -name *.git | xargs rm -rf
+
+ln -sf meta-agl/README-AGL.md
+
+cat <<EOF > aglsetup.sh
+#!/bin/bash
+
+source ./meta-agl/scripts/aglsetup.sh \$@
+EOF
+
+chmod a+x aglsetup.sh
+
+popd
+
+tar -cjvf agl-${BRANCH}-${REVISION}.tar.bz2 agl-${BRANCH}-${REVISION}
+
+md5sum agl-${BRANCH}-${REVISION}.tar.bz2 > agl-${BRANCH}-${REVISION}.tar.bz2.md5sum
+sha256sum agl-${BRANCH}-${REVISION}.tar.bz2 > agl-${BRANCH}-${REVISION}.tar.bz2.sha256sum
+
+
+
+rm -rf UPLOAD || true
+mkdir -p UPLOAD/
+
+cp -ar agl-${RELEASE_BRANCH}-${RELEASE_VERSION}.* UPLOAD/
+
+export RSYNCSRC=$(pwd)/UPLOAD
+export RSYNCDST="/srv/download/AGL/release/${RELEASE_BRANCH}/"
+
+ls -alh UPLOAD/
+
+if test x"yes" = x"${UPLOAD}" ; then
+ set +x
+ ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 "mkdir -p ${RSYNCDST}"
+ rsync -avr -e "ssh -o StrictHostKeyChecking=no" ${RSYNCSRC}/* jenkins-slave@10.30.72.8:${RSYNCDST}
+ ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 "rm -rf ${RSYNCDST}/latest"
+ ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 "ln -sf ${RELEASE_VERSION} ${RSYNCDST}/latest"
+fi