Extend app build train 91/9491/1
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Tue, 23 May 2017 18:01:06 +0000 (20:01 +0200)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Tue, 23 May 2017 18:09:12 +0000 (20:09 +0200)
Change-Id: I893e2cc94ef8c69c1e44293ae824df24300c0889
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
jjb/ci-apps-verify/ci-apps-jjb.local.sh
jjb/ci-apps-verify/ci-apps-jjb.yaml
jjb/common/include-apps-build-app.sh [new file with mode: 0644]

index 8c5a74b..9cae1dc 100755 (executable)
@@ -3,3 +3,4 @@
 set -x
 . ../common/include-apps-header.sh
 . ../common/include-apps-fetch-install-sdk.sh
+. ../common/include-apps-build-app.sh
index 03c6b28..033c1c6 100644 (file)
           name: CIB-{project}
           condition: SUCCESSFUL
           projects:
-            - name: 'ci-apps-{project}-verify-CIB-porter-nogfx'
-              current-parameters: true
-              abort-all-job: true
-              kill-phase-on: FAILURE
-            - name: 'ci-apps-{project}-verify-CIB-intel-corei7-64'
-              current-parameters: true
-              abort-all-job: true
-              kill-phase-on: FAILURE
-            - name: 'ci-apps-{project}-verify-CIB-raspberrypi3'
-              current-parameters: true
-              abort-all-job: true
-              kill-phase-on: FAILURE
-            - name: 'ci-apps-{project}-verify-CIB-dra7xx-evm'
-              current-parameters: true
-              abort-all-job: true
-              kill-phase-on: FAILURE
-            - name: 'ci-apps-{project}-verify-CIB-qemux86-64'
+            - name: 'ci-apps-{project}-verify-CIB-arm'
               current-parameters: true
               abort-all-job: true
               kill-phase-on: FAILURE
       - shell:
           # including from ../common into ci-apps-{project}-verify-CIB-{architecture}
           !include-raw-escape:
-          - ../common/include-apps-fetch-install-sdk.sh
           - ../common/include-apps-header.sh
+          - ../common/include-apps-fetch-install-sdk.sh
+          - ../common/include-apps-build-app.sh
 
     publishers:
       - naginator:
diff --git a/jjb/common/include-apps-build-app.sh b/jjb/common/include-apps-build-app.sh
new file mode 100644 (file)
index 0000000..01d765d
--- /dev/null
@@ -0,0 +1,67 @@
+#!/bin/bash
+# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+#
+# debugging purposes
+set -e
+
+################################################################################
+# build the app
+################################################################################
+
+# fallback
+if test -z "${GERRIT_PROJECT}"; then
+    export GERRIT_PROJECT="apps/controls"
+fi
+if test -z "${GERRIT_BRANCH}"; then
+    export GERRIT_BRANCH="master"
+fi
+if test -z "${GERRIT_REFSPEC}"; then
+    export GERRIT_REFSPEC="refs/tags/dab_3.99.1"
+fi
+if test -z "${GERRIT_HOST}"; then
+    export GERRIT_HOST="gerrit.automotivelinux.org"
+fi
+
+# 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
+
+
+
+HANDLED="no"
+
+# Projects in apps/*
+###################
+if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "^apps/"); then
+
+    MYPROJECT=`echo $TARGETPROJECT | sed -e "s#apps/##g"`
+
+    # clone git
+    rm -rf ${MYPROJECT}
+
+    git clone https://${GERRIT_HOST}/gerrit/${GERRIT_PROJECT}.git
+    pushd ${MYPROJECT}
+        git log -1
+        git reset --hard ${GERRIT_REFSPEC}
+        git log -1
+        if test -f Makefile ; then
+          make
+          make package
+        fi
+        if test -f ${MYPROJECT}.pro; then
+          qmake
+          make
+          make package
+        fi
+    popd
+
+    HANDLED="yes"
+fi