diff options
author | 2018-04-27 23:12:44 +0200 | |
---|---|---|
committer | 2018-04-28 00:18:10 +0200 | |
commit | 2353fe40cad9d9cc230f0617c879100f5b484bf3 (patch) | |
tree | 08bdd1cd15bfafa867642e712840b43abc7a63ee /jjb/common/include-xds-prepare-upload-folder-merged.sh | |
parent | 6857c02981667d84241ba8f232396071c530eeb1 (diff) |
Add template for build of xds-server in CI
Change-Id: I15fe3da53ef882657161111cfb179cf8307778a1
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'jjb/common/include-xds-prepare-upload-folder-merged.sh')
-rw-r--r-- | jjb/common/include-xds-prepare-upload-folder-merged.sh | 48 |
1 files changed, 48 insertions, 0 deletions
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 |