From cf1fc8e08722790752176df0d875a1be8e9c3a32 Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Fri, 9 Jun 2017 19:16:00 +0200 Subject: Update application build to support multiarch builds and upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1998a8a0ae8ad16029fb834e87f06cdc760426d1 Signed-off-by: Jan-Simon Möller --- jjb/common/include-apps-build-app.sh | 23 +++++++++++++++++----- jjb/common/include-apps-fetch-install-sdk.sh | 19 +++++++++--------- jjb/common/include-apps-header.sh | 20 ++++++++++++++----- jjb/common/include-apps-rsync-download-changeid.sh | 12 +++++------ 4 files changed, 47 insertions(+), 27 deletions(-) (limited to 'jjb/common') diff --git a/jjb/common/include-apps-build-app.sh b/jjb/common/include-apps-build-app.sh index 8940ac00..f46c7f8d 100644 --- a/jjb/common/include-apps-build-app.sh +++ b/jjb/common/include-apps-build-app.sh @@ -46,13 +46,26 @@ if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "apps/"); t # clone git rm -rf ${MYPROJECT} - git clone https://${GERRIT_HOST}/gerrit/${GERRIT_PROJECT}.git pushd ${MYPROJECT} - git log -1 - git fetch ${TARGET_REFSPEC} - git reset --hard FETCH_HEAD - git log -1 + git log -1 --pretty=oneline + if test x"" != x"${TARGETREFSPEC}" ; then + git fetch origin ${TARGETREFSPEC} + git reset --hard FETCH_HEAD + else + # try + # GERRIT_CHANGE_NUMBER="9551" + # GERRIT_PATCHSET_NUMBER="2" + if ( test x"" != x"${GERRIT_CHANGE_NUMBER}" -a x"" != x"${GERRIT_PATCHSET_NUMBER}" ) ; then + pip install --user git-review + git review -d ${GERRIT_CHANGE_NUMBER},${GERRIT_PATCHSET_NUMBER} + fi + sleep 2 + # if not reset, we leave it to master + fi + git log -1 --pretty=oneline + + # Fixme: use aglbuild script if test -f Makefile ; then make make package diff --git a/jjb/common/include-apps-fetch-install-sdk.sh b/jjb/common/include-apps-fetch-install-sdk.sh index ad220501..b099d9a5 100644 --- a/jjb/common/include-apps-fetch-install-sdk.sh +++ b/jjb/common/include-apps-fetch-install-sdk.sh @@ -28,23 +28,22 @@ fi chmod a+x ${TARGETSDKNAME} -eval export TARGETSDKENVSCRIPT="${SDKHOSTDIR}/environment-setup-${TARGETSDKARCH}-agl-linux-gnueabi" - -if test ! -f ${TARGETSDKENVSCRIPT} ; then +if test x"" = x"$(eval ls ${SDKHOSTDIR}/environment-setup* | grep "agl-" | grep ${TARGETSDKARCH} 2>/dev/null)" ; then bash ${TARGETSDKNAME} -d ${SDKHOSTDIR}/ -y fi +#set -x + +# find out the env setup script +export TARGETSDKENVSCRIPT="$(eval ls ${SDKHOSTDIR}/environment-setup* | grep "agl-" | grep ${TARGETSDKARCH} 2>/dev/null)" + if test ! -f ${TARGETSDKENVSCRIPT} ; then echo "Script not there after extracting sdk ?!" echo "Abort." exit 1 fi +echo "About to source ${TARGETSDKENVSCRIPT}" source "${TARGETSDKENVSCRIPT}" +#set | grep -i sysroots || true +#set +x -echo "###############################################################################" -ls -alh ~/ -echo "###############################################################################" -ls -alh -echo "###############################################################################" -set -echo "###############################################################################" diff --git a/jjb/common/include-apps-header.sh b/jjb/common/include-apps-header.sh index 7c60b1af..eb57c926 100644 --- a/jjb/common/include-apps-header.sh +++ b/jjb/common/include-apps-header.sh @@ -25,12 +25,17 @@ function dprint() { } #export TARGETARCHALL="arm aarch64 x86-64" +#set | grep arm +#set | grep aarch64 +#set | grep x86-64 -if test x"" = x"${architecture}"; then - export TARGETARCH="arm" -else - export TARGETARCH="${architecture}" -fi +echo "################################################################################" +set | grep TARGETARCH +echo "################################################################################" +#if test x"" = x"${TARGETARCH}"; then +# export TARGETARCH="arm" +#fi +#set +x # finally cmdline arguments while getopts ":b:a:p:r:dvx" opt; do @@ -126,3 +131,8 @@ if test x"" = x"$TARGETSDKMACHINE" ; then echo "No TARGETSDKMACHINE variable. Exiting." exit 1 fi + + +echo "################################################################################" +set | grep ^TARGET +echo "################################################################################" diff --git a/jjb/common/include-apps-rsync-download-changeid.sh b/jjb/common/include-apps-rsync-download-changeid.sh index ad07c9f1..d6e9f8a3 100644 --- a/jjb/common/include-apps-rsync-download-changeid.sh +++ b/jjb/common/include-apps-rsync-download-changeid.sh @@ -12,21 +12,19 @@ export RSYNCDST="/srv/download/AGL/upload/ci/${GERRIT_CHANGE_NUMBER}/${GERRIT_PA export RSYNCSRC=$(pwd)/UPLOAD/ # construct upload folder -mv UPLOAD UPLOAD2 || true -rm -rf UPLOAD2 || true +#mv UPLOAD UPLOAD2 || true +rm -rf UPLOAD/${TARGETARCH} || true mkdir -p UPLOAD/${TARGETARCH} export DEST=$(pwd)/UPLOAD/${TARGETARCH} -pwd - +pushd ${MYPROJECT} ls - ls package - cp package/*.wgt $DEST -tree $DEST ls -alh $DEST +LANG=C tree $RSYNCSRC +popd ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 mkdir -p ${RSYNCDST} rsync -avr -L -e "ssh -o StrictHostKeyChecking=no" $RSYNCSRC jenkins-slave@10.30.72.8:$RSYNCDST -- cgit 1.2.3-korg