aboutsummaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>2016-11-07 01:06:10 +0100
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>2016-11-07 01:10:58 +0100
commit8ba75db0b618fe29a570a955d2413ee7015bab02 (patch)
tree6680df71b090b49d3c7ece219d260fab587b1265 /jjb
parentdab5209169703854951e0a2b74723b66d64c03b0 (diff)
build the snapshot
Change-Id: I65dd1fb1fe10c0326ecfe4493b4a4a4815c6c1dd Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/common/.gitignore4
-rwxr-xr-xjjb/common/include-agl-build.sh197
l---------[-rw-r--r--]jjb/release-jjb-blowfish-snapshot/include-release-jjb-blowfish-snapshot-build.sh8
-rw-r--r--jjb/release-jjb-blowfish-snapshot/include-release-jjb-blowfish-snapshot-rsync.sh4
-rw-r--r--jjb/release-jjb-blowfish-snapshot/release-jjb-blowfish-snapshot.yaml17
5 files changed, 223 insertions, 7 deletions
diff --git a/jjb/common/.gitignore b/jjb/common/.gitignore
new file mode 100644
index 00000000..67b30669
--- /dev/null
+++ b/jjb/common/.gitignore
@@ -0,0 +1,4 @@
+downloads
+sstate-cache
+repoclone*
+current_* \ No newline at end of file
diff --git a/jjb/common/include-agl-build.sh b/jjb/common/include-agl-build.sh
new file mode 100755
index 00000000..5396d846
--- /dev/null
+++ b/jjb/common/include-agl-build.sh
@@ -0,0 +1,197 @@
+#!/bin/bash
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+#
+# debugging purposes
+set -e
+
+# VARIABLES
+OPTIND=1
+export DLHOST="https://download-new.automotivelinux.org/"
+export NOGFX=false
+export VERBOSE=false
+export DEBUG=false
+function vprint() {
+ :
+}
+function dprint() {
+ :
+}
+
+# defaults for project, branch, refspec
+export TARGETPROJECT="AGL/AGL-repo"
+export TARGETBRANCH="master"
+export TARGETREFSPEC="refs/heads/master"
+
+export TARGETFEATURESnogfx="agl-appfw-smack agl-netboot agl-sota agl-devel"
+export TARGETFEATURES="agl-demo ${TARGETFEATURESnogfx}"
+
+export TARGETQA=""
+export TARGETIMAGE="agl-demo-platform\${TARGETQA}"
+export TARGETIMAGEnogfx="agl-image-ivi\${TARGETQA}"
+
+# apply GERRIT_*
+if test -n "${GERRIT_PROJECT}"; then
+export TARGETPROJECT="${GERRIT_PROJECT}"
+fi
+if test -n "${GERRIT_BRANCH}"; then
+ export TARGETBRANCH="${GERRIT_BRANCH}"
+fi
+if test -n "${GERRIT_REFSPEC}"; then
+export TARGETREFSPEC="${GERRIT_REFSPEC}"
+fi
+
+if test x"" = x"${MACHINE}"; then
+ export MACHINE="qemux86-64"
+fi
+
+# finally cmdline arguments
+while getopts ":b:i:p:r:dnqvx" opt; do
+ case "$opt" in
+ b)
+ export TARGETBRANCH="$OPTARG"
+ ;;
+ d)
+ DEBUG=true
+ function dprint() {
+ echo "DEBUG: $@"
+ }
+ ;;
+ i)
+ export TARGETIMAGE="$OPTARG"
+ ;;
+ n)
+ export NOGFX=true
+ ;;
+ p)
+ export TARGETPROJECT="$OPTARG"
+ ;;
+ q)
+ export TARGETQA="-qa"
+ ;;
+ r)
+ export TARGETREFSPEC="$OPTARG"
+ ;;
+ v)
+ VERBOSE=true
+ function vprint() {
+ echo "VERBOSE: \"$@\""
+ }
+ ;;
+ x)
+ set -x
+ ;;
+ h|\?)
+ echo "$0 [-h/-?] -bdinpqrvx"
+ echo "--------------------------------------------------------------------------------"
+ echo " -b <branch> - name of the branch to use (default=master)"
+ echo " -d - debug"
+ echo " -i <image> - name of the image to build (default=agl-demo-platform)"
+ echo " -n - no graphics (no wayland, aka no drivers)"
+ echo " -p <project> - project to use (default=AGL/AGL-repo)"
+ echo " -q - build '*-qa' images (default='')"
+ echo " -r <refspec> - refspec to use (default=refs/heads/master)"
+ echo " -v - verbose"
+ echo " -x - set -x"
+ echo "--------------------------------------------------------------------------------"
+ echo " GERRIT_PROJECT, GERRIT_BRANCH, GERRIT_REFSPEC are used if present,"
+ echo " but cmdline arguments take precedence."
+ echo "--------------------------------------------------------------------------------"
+ exit 1
+ ;;
+ :)
+ echo "Option -$OPTARG required an argument."
+ exit 1
+ ;;
+ esac
+done
+
+# expand
+eval TARGETIMAGE="$TARGETIMAGE"
+eval TARGETIMAGEnogfx="$TARGETIMAGEnogfx"
+
+if $NOGFX; then
+TARGETIMAGE=${TARGETIMAGEnogfx}
+fi
+
+if $DEBUG; then
+set | grep ^TARGET || true
+set | grep ^GERRIT || true
+set | grep ^MACHINE || true
+fi
+
+
+# create shared downloads and sstate-cache directory
+mkdir -p downloads
+mkdir -p sstate-cache
+
+# remove old files, we want to test a fresh clone
+export XTMP="$$"
+mv repoclone repoclone$XTMP || true
+( rm -rf repoclone$XTMP & ) || true
+mkdir -p repoclone
+cd repoclone
+
+repo init --reference=/opt/AGL/preclone -q -b $TARGETBRANCH -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
+
+# next: repo sync and dump manifest
+repo sync --force-sync --detach --no-clone-bundle
+
+# fix up this branch
+MYPROJECT=`echo $TARGETPROJECT | sed -e "s#AGL/##g"`
+
+
+if test -n "${GERRIT_CHANGE_NUMBER}" -a -n "${GERRIT_PATCHSET_NUMBER}" ; then
+ repo download $MYPROJECT ${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}
+else
+ if test x"AGL-repo" = x"$MYPROJECT" ; then
+ cd .repo/manifests
+ MYREMOTE=`git remote | head -1`
+ git fetch ${MYREMOTE} ${TARGETREFSPEC}
+ git reset --hard FETCH_HEAD
+ cd ../../
+ repo sync --force-sync -d
+ else
+ cd $MYPROJECT
+ MYREMOTE=`git remote | head -1`
+ git fetch ${MYREMOTE} ${TARGETREFSPEC}
+ git reset --hard FETCH_HEAD
+ cd ..
+ fi
+fi
+
+repo manifest -r
+repo manifest -r > ../current_default.xml
+
+# source the env
+source meta-agl/scripts/aglsetup.sh -m ${MACHINE} -b output ${TARGETFEATURES}
+
+# link the shared downloads and sstate-cache
+ln -sf ../../downloads
+ln -sf ../../sstate-cache
+
+echo "" >> conf/local.conf
+
+#limit parallel number of bitbake jobs and parallel jobs in make
+cat << EOF > conf/auto.conf
+PREMIRRORS = "\
+git://.*/.* ${DLHOST}/AGL/mirror/ \n \
+ftp://.*/.* ${DLHOST}/AGL/mirror/ \n \
+http://.*/.* ${DLHOST}/AGL/mirror/ \n \
+https://.*/.* ${DLHOST}/AGL/mirror/ \n \
+ "
+
+SSTATE_MIRRORS = "\
+file://.* file:///opt/AGL/sstate-mirror/\${MACHINE}/PATH \n \
+file://.* ${DLHOST}/sstate-mirror/\${MACHINE}/PATH \n \
+ "
+
+SSTATE_DIR = "\${TOPDIR}/sstate-cache/\${MACHINE}/"
+EOF
+
+cat conf/auto.conf
+
+# finally, build the agl-demo-platform
+bitbake $TARGETIMAGE
+
+du -hs tmp/deploy/*
diff --git a/jjb/release-jjb-blowfish-snapshot/include-release-jjb-blowfish-snapshot-build.sh b/jjb/release-jjb-blowfish-snapshot/include-release-jjb-blowfish-snapshot-build.sh
index f990fcc9..2f40c060 100644..120000
--- a/jjb/release-jjb-blowfish-snapshot/include-release-jjb-blowfish-snapshot-build.sh
+++ b/jjb/release-jjb-blowfish-snapshot/include-release-jjb-blowfish-snapshot-build.sh
@@ -1,7 +1 @@
-#!/bin/bash
-
-set -e
-set -x
-
-set
-
+../common/include-agl-build.sh \ No newline at end of file
diff --git a/jjb/release-jjb-blowfish-snapshot/include-release-jjb-blowfish-snapshot-rsync.sh b/jjb/release-jjb-blowfish-snapshot/include-release-jjb-blowfish-snapshot-rsync.sh
index 7da13434..aea85c48 100644
--- a/jjb/release-jjb-blowfish-snapshot/include-release-jjb-blowfish-snapshot-rsync.sh
+++ b/jjb/release-jjb-blowfish-snapshot/include-release-jjb-blowfish-snapshot-rsync.sh
@@ -10,4 +10,8 @@ export RSYNCDST="jenkins-slave@10.30.72.8:/srv/download/AGL/mirror/"
echo " rsync -avr -e \"ssh -o StrictHostKeyChecking=no\" $RSYNCSRC $RSYNCDST "
+if x"true" = x"$UPLOAD" ; then
+echo upload
+fi
+
exit 0 \ No newline at end of file
diff --git a/jjb/release-jjb-blowfish-snapshot/release-jjb-blowfish-snapshot.yaml b/jjb/release-jjb-blowfish-snapshot/release-jjb-blowfish-snapshot.yaml
index 846d5456..321792c2 100644
--- a/jjb/release-jjb-blowfish-snapshot/release-jjb-blowfish-snapshot.yaml
+++ b/jjb/release-jjb-blowfish-snapshot/release-jjb-blowfish-snapshot.yaml
@@ -9,6 +9,23 @@
concurrent: false
node: master
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: AGL/AGL-repo
+ description: "Project to build"
+ - string:
+ name: GERRIT_BRANCH
+ default: blowfish
+ description: "branch to build"
+ - string:
+ name: GERRIT_REFSPEC
+ default: refs/heads/blowfish
+ description: "refspec to build"
+ - string:
+ name: UPLOAD
+ default: false
+ description: "Upload?"
axes:
- axis:
type: user-defined