aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/common
diff options
context:
space:
mode:
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>2018-04-27 23:12:44 +0200
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>2018-04-28 00:18:10 +0200
commit2353fe40cad9d9cc230f0617c879100f5b484bf3 (patch)
tree08bdd1cd15bfafa867642e712840b43abc7a63ee /jjb/common
parent6857c02981667d84241ba8f232396071c530eeb1 (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')
-rw-r--r--jjb/common/include-xds-build-common.sh18
-rw-r--r--jjb/common/include-xds-header.sh5
-rw-r--r--jjb/common/include-xds-prepare-upload-folder-merged.sh48
-rw-r--r--jjb/common/include-xds-prepare-upload-folder.sh31
-rw-r--r--jjb/common/include-xds-rsync-download-changeid.sh14
-rw-r--r--jjb/common/include-xds-rsync-download-xds.sh17
6 files changed, 133 insertions, 0 deletions
diff --git a/jjb/common/include-xds-build-common.sh b/jjb/common/include-xds-build-common.sh
new file mode 100644
index 00000000..90033bc9
--- /dev/null
+++ b/jjb/common/include-xds-build-common.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# (c) 2018 Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
+# License: GPLv2
+
+
+ROOTDIR=`pwd`
+rm -rf $ROOTDIR/src || true
+mkdir -p $ROOTDIR/src/gerrit.automotivelinux.org/gerrit/xds
+cd $ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds
+git clone https://gerrit.automotivelinux.org/gerrit/${GERRIT_PROJECT}
+cd ${PROJECT_TO_BUILD}
+export V=1
+make package-all
+
+cd $ROOTDIR
+tree
+
diff --git a/jjb/common/include-xds-header.sh b/jjb/common/include-xds-header.sh
new file mode 100644
index 00000000..126e79d4
--- /dev/null
+++ b/jjb/common/include-xds-header.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# (c) 2018 Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
+# License: GPLv2
+
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
diff --git a/jjb/common/include-xds-prepare-upload-folder.sh b/jjb/common/include-xds-prepare-upload-folder.sh
new file mode 100644
index 00000000..e28e462a
--- /dev/null
+++ b/jjb/common/include-xds-prepare-upload-folder.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+#set -x
+set -e
+
+echo -e "\n\n\n"
+echo "#########################################"
+echo -e "\n\n\n"
+
+
+
+# construct upload folder
+#mv UPLOAD UPLOAD2 || true
+rm -rf UPLOAD/${AGLBRANCH} || true
+mkdir -p UPLOAD/${AGLBRANCH}/
+export DEST=$(pwd)/UPLOAD/${AGLBRANCH}/
+
+pushd ${MYPROJECT}
+pwd
+
+ls -alh
+
+ls
+
+ls package || true
+
+cp src/gerrit.automotivelinux.org/gerrit/${GERRIT_PROJECT}/*.zip $DEST
+
+ls -alh $DEST
+
+popd
diff --git a/jjb/common/include-xds-rsync-download-changeid.sh b/jjb/common/include-xds-rsync-download-changeid.sh
new file mode 100644
index 00000000..c8e341a5
--- /dev/null
+++ b/jjb/common/include-xds-rsync-download-changeid.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+#set -x
+set -e
+
+echo -e "\n\n\n"
+echo "#########################################"
+echo -e "\n\n\n"
+
+export RSYNCDST="/srv/download/AGL/upload/ci/${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}/"
+export RSYNCSRC=$(pwd)/UPLOAD/*
+LANG=C tree $RSYNCSRC
+ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 mkdir -p ${RSYNCDST}
+rsync -avr --inplace -L -e "ssh -o StrictHostKeyChecking=no" $RSYNCSRC jenkins-slave@10.30.72.8:$RSYNCDST
diff --git a/jjb/common/include-xds-rsync-download-xds.sh b/jjb/common/include-xds-rsync-download-xds.sh
new file mode 100644
index 00000000..08c00707
--- /dev/null
+++ b/jjb/common/include-xds-rsync-download-xds.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+#set -x
+set -e
+
+echo -e "\n\n\n"
+echo "#########################################"
+echo -e "\n\n\n"
+# project branch buildid-changesetnr(latest)
+export RSYNCDST="/srv/download/AGL/xds/"
+export RSYNCSRC=$(pwd)/UPLOAD/*
+LANG=C tree $RSYNCSRC
+
+#set
+#exit 0
+ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 mkdir -p ${RSYNCDST}
+rsync -avr -l --inplace --copy-unsafe-links -e "ssh -o StrictHostKeyChecking=no" $RSYNCSRC jenkins-slave@10.30.72.8:$RSYNCDST