Send negative message on failure and adapt url to point to overview page 63/8663/1
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Wed, 8 Mar 2017 00:31:14 +0000 (01:31 +0100)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Wed, 8 Mar 2017 00:31:14 +0000 (01:31 +0100)
Change-Id: Iad00f1cd317ed40b05ad589cdb2e735d887cdefc
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
jjb/ci-AGL-verify/ci-platform-jjb.yaml

index 1a5e23d..a9ad0d2 100644 (file)
@@ -17,7 +17,8 @@
         - ci-platform-{project}-verify
         - ci-platform-{project}-verify-CIB-start
         - ci-platform-{project}-verify-CIB-{machine}
-        - ci-platform-{project}-verify-CIB-finish
+        - ci-platform-{project}-verify-CIB-finish-success
+        - ci-platform-{project}-verify-CIB-finish-failure
         - ci-platform-{project}-verify-CIBT-start
         - ci-platform-{project}-verify-CIBT-{machine}
         - ci-platform-{project}-verify-CIBT-finish
               abort-all-job: true
               kill-phase-on: FAILURE
       - multijob:
-          name: CIB-{project}-finish
+          name: CIB-{project}-finish-success
           condition: SUCCESSFUL
           projects:
-            - name: 'ci-platform-{project}-verify-CIB-finish'
+            - name: 'ci-platform-{project}-verify-CIB-finish-success'
+              current-parameters: true
+              abort-all-job: true
+              kill-phase-on: FAILURE
+      - multijob:
+          name: CIB-{project}-finish-failure
+          condition: FAILURE
+          projects:
+            - name: 'ci-platform-{project}-verify-CIB-finish-failure'
               current-parameters: true
               abort-all-job: true
               kill-phase-on: FAILURE
 
     builders:
       - shell: |
-          ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified=0 --label ci-image-build=0 --label ci-image-boot-test=0 -n NONE --message="CI-Image-Build\ started.\ URL:\ ${{BUILD_URL}}" || true
+          set
+          export TRIGGERURL=$(echo ${{BUILDURL}} | sed -e 's,-CIB-start/,,')
+          ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified=0 --label ci-image-build=0 --label ci-image-boot-test=0 -n NONE --message="CI-Image-Build\ started.\ URL:\ ${{TRIGGERURL}}" || true
+
 #
-# CIB-finish
-############
+# CIB-finish-success
+####################
 
 - job-template:
-    name: 'ci-platform-{project}-verify-CIB-finish'
+    name: 'ci-platform-{project}-verify-CIB-finish-success'
     project-type: freestyle
     concurrent: true
     node: control-slave
           echo "#### CIB +1 #### Verified +1 ####"
           ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified +1 --label ci-image-build=+1 -n NONE --message="CI-Image-Build\ finished,\ CIB+1,\ Verified+1" || true
 
+#
+# CIB-finish-failure
+####################
+
+- job-template:
+    name: 'ci-platform-{project}-verify-CIB-finish-failure'
+    project-type: freestyle
+    concurrent: true
+    node: control-slave
+
+    parameters:
+      - string:
+          name: GERRIT_PROJECT
+          default: 'AGL/{project}'
+          description: "Project to build"
+      - string:
+          name: GERRIT_BRANCH
+          default: master
+          description: "branch to build"
+      - string:
+          name: GERRIT_REFSPEC
+          default: refs/heads/master
+          description: "refspec to build"
+      - string:
+          name: GERRIT_CHANGE_NUMBER
+          default: "8313"
+          description: "change # to build"
+      - string:
+          name: GERRIT_PATCHSET_NUMBER
+          default: "2"
+          description: "patchset # to build"
+
+    build-discarder:
+      days-to-keep: 30
+      artifact-days-to-keep: -1
+      artifact-num-to-keep: 5
+
+    wrappers:
+      - agl-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    builders:
+      - shell: |
+          set
+          echo "#### CIB -1 #### Verified -1 ####"
+          ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified -1 --label ci-image-build=-1 -n NONE --message="CI-Image-Build\ failed,\ CIB-1,\ Verified-1" || true
+
 
 #
 # CIBT-{machine} 'BOOT TEST'