aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/common/include-agl-select.sh
diff options
context:
space:
mode:
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>2016-11-07 12:37:23 +0100
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>2016-11-07 12:49:16 +0100
commitcf00e8181097e32ff40dd69e1c15d7a0c9ea3a40 (patch)
tree27895a535feac0b6aaf0fbcedb6d85148c479410 /jjb/common/include-agl-select.sh
parentcb44fe25cc827eeb23a5681f2b34e66066644b0b (diff)
Add generic jjb CI job for AGL
Change-Id: I8264fd08a6ea2348751c1c7ed15da1103fbf4272 Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'jjb/common/include-agl-select.sh')
-rw-r--r--jjb/common/include-agl-select.sh87
1 files changed, 87 insertions, 0 deletions
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