From cf00e8181097e32ff40dd69e1c15d7a0c9ea3a40 Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Mon, 7 Nov 2016 12:37:23 +0100 Subject: Add generic jjb CI job for AGL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8264fd08a6ea2348751c1c7ed15da1103fbf4272 Signed-off-by: Jan-Simon Möller --- jjb/common/include-agl-select.sh | 87 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 jjb/common/include-agl-select.sh (limited to 'jjb/common/include-agl-select.sh') 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 -- cgit 1.2.3-korg