From 2353fe40cad9d9cc230f0617c879100f5b484bf3 Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Fri, 27 Apr 2018 23:12:44 +0200 Subject: Add template for build of xds-server in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I15fe3da53ef882657161111cfb179cf8307778a1 Signed-off-by: Jan-Simon Möller --- .../include-xds-prepare-upload-folder-merged.sh | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 jjb/common/include-xds-prepare-upload-folder-merged.sh (limited to 'jjb/common/include-xds-prepare-upload-folder-merged.sh') diff --git a/jjb/common/include-xds-prepare-upload-folder-merged.sh b/jjb/common/include-xds-prepare-upload-folder-merged.sh new file mode 100644 index 00000000..c4b990d7 --- /dev/null +++ b/jjb/common/include-xds-prepare-upload-folder-merged.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +#set -x +set -e + +echo -e "\n\n\n" +echo "#########################################" +echo -e "\n\n\n" + +#failsafe +if test x"" = x"${AGLBRANCH}" ; then + echo "AGLBRANCH not defined" + exit 1 +fi +if test x"" = x"${MYPROJECT}"; then + echo "MYPROJECT not defined" + exit 1 +fi +if test x"" = x"${BUILD_NUMBER}"; then + echo "BUILD_NUMBER not defined" + exit 1 +fi +if test x"" = x"${GERRIT_CHANGE_NUMBER}"; then + echo "GERRIT_CHANGE_NUMBER not defined" + exit 1 +fi +if test x"" = x"${TARGETARCH}"; then + echo "TARGETARCH is not defined" + exit 1 +fi + +# construct upload folder +#mv UPLOAD UPLOAD2 || true +rm -rf UPLOAD/* || true + +PROJECTDIR="${AGLBRANCH}/${MYPROJECT}/" +PROJECTPATTERN="${PROJECTDIR}/changeset-${GERRIT_CHANGE_NUMBER}" + +mkdir -p UPLOAD/${PROJECTPATTERN} +ln -sf changeset-${GERRIT_CHANGE_NUMBER} UPLOAD/${PROJECTDIR}/latest +export DEST=$(pwd)/UPLOAD/${PROJECTPATTERN}/ + +# copy the wgt to the upload folder +pushd ${MYPROJECT} + +cp src/gerrit.automotivelinux.org/gerrit/${GERRIT_PROJECT}/*.zip $DEST/ + +popd -- cgit 1.2.3-korg