diff options
-rw-r--r-- | jjb/ci-jjb-AGL/ci-jjb-AGL.yaml | 70 | ||||
-rw-r--r-- | jjb/common/include-agl-auto-conf.sh | 25 | ||||
-rw-r--r-- | jjb/common/include-agl-bitbake-image.sh | 11 | ||||
-rw-r--r-- | jjb/common/include-agl-bitbake-sdk.sh | 11 | ||||
-rw-r--r--[-rwxr-xr-x] | jjb/common/include-agl-build.sh | 0 | ||||
-rw-r--r-- | jjb/common/include-agl-header.sh | 132 | ||||
-rw-r--r-- | jjb/common/include-agl-local-conf-archiver.sh | 10 | ||||
-rw-r--r-- | jjb/common/include-agl-local-conf-isafw.sh | 10 | ||||
-rw-r--r-- | jjb/common/include-agl-local-conf-vmdk.sh | 10 | ||||
-rw-r--r-- | jjb/common/include-agl-repo.sh | 23 | ||||
-rw-r--r-- | jjb/common/include-agl-select.sh | 87 | ||||
-rw-r--r-- | jjb/common/include-agl-source-aglsetup.sh | 17 | ||||
-rw-r--r-- | jjb/common/include-agl-test-nbd-short.sh | 29 | ||||
-rw-r--r-- | jjb/global-macros.yaml | 36 |
14 files changed, 457 insertions, 14 deletions
diff --git a/jjb/ci-jjb-AGL/ci-jjb-AGL.yaml b/jjb/ci-jjb-AGL/ci-jjb-AGL.yaml new file mode 100644 index 00000000..2ca384a3 --- /dev/null +++ b/jjb/ci-jjb-AGL/ci-jjb-AGL.yaml @@ -0,0 +1,70 @@ +- project: + name: ci-jjb-AGL + jobs: + - ci-jjb-AGL + +- job-template: + name: 'ci-jjb-AGL' + project-type: matrix + concurrent: true + node: master + disabled: true + + 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" + + axes: + - axis: + type: user-defined + name: MACHINE + values: + - qemux86 + - porter-nogfx + - intel-corei7-64 + - axis: + type: slave + name: label + values: + - agl-test-slave + + build-discarder: + days-to-keep: 30 + num-to-keep: 40 + artifact-days-to-keep: -1 + artifact-num-to-keep: 5 + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + + triggers: + - gerrit-trigger-patch-merged: + name: 'AGL/**' + branch: '**' + + wrappers: + - agl-infra-wrappers: + build-timeout: '{build-timeout}' + + builders: + - shell: + !include-raw-escape: + - ../common/include-agl-header.sh + - ../common/include-agl-repo.sh + - ../common/include-agl-select.sh + - ../common/include-agl-source-aglsetup.sh + - ../common/include-agl-auto-conf.sh + - ../common/include-agl-bitbake-image.sh + - ../common/include-agl-test-nbd-short.sh diff --git a/jjb/common/include-agl-auto-conf.sh b/jjb/common/include-agl-auto-conf.sh new file mode 100644 index 00000000..22fce7d2 --- /dev/null +++ b/jjb/common/include-agl-auto-conf.sh @@ -0,0 +1,25 @@ +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 + +################################################################################ +## Main +################################################################################ + +#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 diff --git a/jjb/common/include-agl-bitbake-image.sh b/jjb/common/include-agl-bitbake-image.sh new file mode 100644 index 00000000..180cef78 --- /dev/null +++ b/jjb/common/include-agl-bitbake-image.sh @@ -0,0 +1,11 @@ +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 + +################################################################################ +## Main +################################################################################ + +# finally, build the agl-demo-platform (we retry to catch the tar-native bug) +bitbake $TARGETIMAGE || bitbake $TARGETIMAGE + +du -hs tmp/deploy/* diff --git a/jjb/common/include-agl-bitbake-sdk.sh b/jjb/common/include-agl-bitbake-sdk.sh new file mode 100644 index 00000000..4627932b --- /dev/null +++ b/jjb/common/include-agl-bitbake-sdk.sh @@ -0,0 +1,11 @@ +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 + +################################################################################ +## Main +################################################################################ + +# finally, build the agl-demo-platform (we retry to catch the tar-native bug) +bitbake -c $TARGETSDK $TARGETIMAGE || bitbake -c $TARGETSDK $TARGETIMAGE + +du -hs tmp/deploy/* diff --git a/jjb/common/include-agl-build.sh b/jjb/common/include-agl-build.sh index c09616c1..c09616c1 100755..100644 --- a/jjb/common/include-agl-build.sh +++ b/jjb/common/include-agl-build.sh diff --git a/jjb/common/include-agl-header.sh b/jjb/common/include-agl-header.sh new file mode 100644 index 00000000..62dd6445 --- /dev/null +++ b/jjb/common/include-agl-header.sh @@ -0,0 +1,132 @@ +#!/bin/bash +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 +# +# debugging purposes +set -e + +################################################################################ +## HEADER +################################################################################ + + +# 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}" + +export TARGETSDK="populate_sdk" + +# 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 + export TARGETIMAGE=${TARGETIMAGEnogfx} +fi +if test x"porter-nogfx" = x"$MACHINE"; then + export TARGETIMAGE=${TARGETIMAGEnogfx} +fi + +#if $DEBUG; then +set | grep ^TARGET || true +set | grep ^GERRIT || true +set | grep ^MACHINE || true +#fi + diff --git a/jjb/common/include-agl-local-conf-archiver.sh b/jjb/common/include-agl-local-conf-archiver.sh new file mode 100644 index 00000000..f9478ee0 --- /dev/null +++ b/jjb/common/include-agl-local-conf-archiver.sh @@ -0,0 +1,10 @@ +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 + +################################################################################ +## Main +################################################################################ + +# archive sources within tmp/deploy/ +echo 'INHERIT += "archiver"' >> conf/local.conf +echo 'ARCHIVER_MODE[src] = "original"' >> conf/local.conf diff --git a/jjb/common/include-agl-local-conf-isafw.sh b/jjb/common/include-agl-local-conf-isafw.sh new file mode 100644 index 00000000..dea4f2fc --- /dev/null +++ b/jjb/common/include-agl-local-conf-isafw.sh @@ -0,0 +1,10 @@ +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 + +################################################################################ +## Main +################################################################################ + +# meta-security-isafw +echo "BBLAYERS += \" $(pwd)/../meta-security-isafw \" " >> conf/bblayers.conf +echo "INHERIT += \"isafw\" " >> conf/local.conf diff --git a/jjb/common/include-agl-local-conf-vmdk.sh b/jjb/common/include-agl-local-conf-vmdk.sh new file mode 100644 index 00000000..bd582e97 --- /dev/null +++ b/jjb/common/include-agl-local-conf-vmdk.sh @@ -0,0 +1,10 @@ +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 + +################################################################################ +## Main +################################################################################ + +if test x"qemux86" == x"$MACHINE" -o x"qemux86-64" == x"$MACHINE" ; then + echo 'IMAGE_FSTYPES += "vmdk"' >> conf/local.conf +fi diff --git a/jjb/common/include-agl-repo.sh b/jjb/common/include-agl-repo.sh new file mode 100644 index 00000000..f95e3206 --- /dev/null +++ b/jjb/common/include-agl-repo.sh @@ -0,0 +1,23 @@ +# (c) 2016 Jan-Simon Moeller, dl9pf(at)gmx.de +# License: GPLv2 + +################################################################################ +## Main +################################################################################ + +# 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 + diff --git a/jjb/common/include-agl-select.sh b/jjb/common/include-agl-select.sh new file mode 100644 index 00000000..b46c4ea4 --- /dev/null +++ b/jjb/common/include-agl-select.sh @@ -0,0 +1,87 @@ +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 + +################################################################################ +## Main +################################################################################ + +HANDLED=false + +# Projects in AGL/* +################### +if test !$HANDLED -a $(echo "$TARGETPROJECT" | grep -q "^AGL/"); then + + MYPROJECT=`echo $TARGETPROJECT | sed -e "s#AGL/##g"` + + 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 + if test -n "${GERRIT_CHANGE_NUMBER}" -a -n "${GERRIT_PATCHSET_NUMBER}" ; then + repo download $MYPROJECT ${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER} + else + cd $MYPROJECT + MYREMOTE=`git remote | head -1` + git fetch ${MYREMOTE} ${TARGETREFSPEC} + git reset --hard FETCH_HEAD + cd .. + fi + fi + HANDLED=true +fi + + +# Projects in src/* +################### +if test !$HANDLED -a $(echo "$TARGETPROJECT" | grep -q "^src/"); then + +MYPROJECT=`echo $TARGETPROJECT | sed -e "s#src/##g"` + +# We need to set the refspec in the recipe. +# Therefore each src/* must have a .aglrecipe file with the location +# relative to a repo clone +# e.g. ./meta-agl/meta-agl/recipes-graphics/wayland/foo.bb +# +# Also there must be a SRCREV tag which we can manipulate. +# +# +echo "Not implemented" +exit 0 + +fi + + +# Projects in staging/* +####################### +if test !$HANDLED -a $(echo "$TARGETPROJECT" | grep -q "^staging/"); then + +MYPROJECT=`echo $TARGETPROJECT | sed -e "s#staging/##g"` + +# We need to set the refspec in the recipe. +# Therefore each src/* must have a .aglrecipe file with the location +# relative to a repo clone +# e.g. ./meta-agl/meta-agl/recipes-graphics/wayland/foo.bb +# +# Also there must be a SRCREV tag which we can manipulate. +# +# +echo "Not implemented" +exit 0 + + +fi + +if !$HANDLED; then + echo "COULD NOT SELECT PROJECT, something is wrong!" + echo "$TARGETPROJECT" + echo "" + set + exit 1 +fi + +repo manifest -r +repo manifest -r > ../current_default.xml diff --git a/jjb/common/include-agl-source-aglsetup.sh b/jjb/common/include-agl-source-aglsetup.sh new file mode 100644 index 00000000..f66d83fb --- /dev/null +++ b/jjb/common/include-agl-source-aglsetup.sh @@ -0,0 +1,17 @@ +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 + +################################################################################ +## Main +################################################################################ + +# 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 +echo "### ADDED BY AUTOBUILDER ###" >> conf/local.conf +echo "" >> conf/local.conf diff --git a/jjb/common/include-agl-test-nbd-short.sh b/jjb/common/include-agl-test-nbd-short.sh new file mode 100644 index 00000000..dcaa65cb --- /dev/null +++ b/jjb/common/include-agl-test-nbd-short.sh @@ -0,0 +1,29 @@ +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 + +################################################################################ +## Main +################################################################################ + +# test currently only for porter, rest WIP +TESTRUN=false +echo "## $MACHINE ##" + +case $MACHINE in + porter-nogfx) + TESTRUN=true + ;; + porter) + TESTRUN=true + ;; + *) + TESTRUN=false + ;; +esac + + +if $TESTRUN; then + +echo "TBD" + +fi
\ No newline at end of file diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml index ad4a42de..e5eadd95 100644 --- a/jjb/global-macros.yaml +++ b/jjb/global-macros.yaml @@ -83,18 +83,26 @@ trigger-on: - patchset-created-event: exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' + exclude-trivial-rebase: 'true' + exclude-no-code-change: 'true' - draft-published-event - comment-added-contains-event: comment-contains-value: 'recheck' - comment-added-contains-event: + comment-contains-value: 'rebuild' + - comment-added-contains-event: comment-contains-value: 'reverify' + - comment-added-contains-event: + comment-contains-value: 'RECHECK' + - comment-added-contains-event: + comment-contains-value: 'REBUILD' + - comment-added-contains-event: + comment-contains-value: 'REVERIFY' projects: - - project-compare-type: 'ANT' + - project-compare-type: 'PLAIN' project-pattern: '{name}' branches: - - branch-compare-type: 'ANT' + - branch-compare-type: 'PLAIN' branch-pattern: '**/{branch}' - trigger: @@ -107,10 +115,10 @@ - comment-added-contains-event: comment-contains-value: 'remerge' projects: - - project-compare-type: 'ANT' + - project-compare-type: 'PLAIN' project-pattern: '{name}' branches: - - branch-compare-type: 'ANT' + - branch-compare-type: 'PLAIN' branch-pattern: '**/{branch}' - trigger: @@ -129,10 +137,10 @@ - comment-added-contains-event: comment-contains-value: 'reverify' projects: - - project-compare-type: 'ANT' + - project-compare-type: 'PLAIN' project-pattern: '{name}' branches: - - branch-compare-type: 'ANT' + - branch-compare-type: 'PLAIN' branch-pattern: '**/{branch}' silent-start: 'true' @@ -145,10 +153,10 @@ - comment-added-contains-event: comment-contains-value: 'fullcheck' projects: - - project-compare-type: 'ANT' + - project-compare-type: 'PLAIN' project-pattern: '{name}' branches: - - branch-compare-type: 'ANT' + - branch-compare-type: 'PLAIN' branch-pattern: '**/{branch}' silent-start: 'true' @@ -162,10 +170,10 @@ - comment-added-contains-event: comment-contains-value: 'remerge' projects: - - project-compare-type: 'Plain' + - project-compare-type: 'PLAIN' project-pattern: '{name}' branches: - - branch-compare-type: 'Path' + - branch-compare-type: 'PLAIN' branch-pattern: '**/{branch}' silent-start: 'true' @@ -177,10 +185,10 @@ trigger-on: - ref-updated-event projects: - - project-compare-type: 'Plain' + - project-compare-type: 'PLAIN' project-pattern: '{name}' branches: - - branch-compare-type: 'Path' + - branch-compare-type: 'PLAIN' branch-pattern: 'refs/tags/**' # Publishers |