[HICN-3] Add hicn checkstyle verify job before hicn build verify job. 85/16985/2
authorMauro Sardara <msardara@cisco.com>
Tue, 22 Jan 2019 23:28:56 +0000 (00:28 +0100)
committerMauro Sardara <msardara@cisco.com>
Wed, 23 Jan 2019 17:13:20 +0000 (18:13 +0100)
Change-Id: I4282e658e01dbdeb87863eaddb12412fbe07c70e
Signed-off-by: Mauro Sardara <msardara@cisco.com>
jjb/hicn/hicn.yaml

index 5f334c8..7007d70 100644 (file)
       - short
       - long
 
+- job-template:
+    name: 'hicn-checkstyle-verify-{stream}'
+
+    project-type: freestyle
+    node: '{os}-us'
+    concurrent: true
+
+    build-discarder:
+      daysToKeep: '{build-days-to-keep}'
+      numToKeep: '{build-num-to-keep}'
+      artifactDaysToKeep: '{build-artifact-days-to-keep}'
+      artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+      - gerrit-parameter:
+          branch: '{branch}'
+      - os-parameter:
+          os: '{os}'
+      - repo-name-parameter:
+          repo-name: '{repo-stream-part}.ubuntu.xenial.main'
+
+    scm:
+      - gerrit-trigger-scm:
+          credentials-id: 'jenkins-gerrit-credentials'
+          refspec: '$GERRIT_REFSPEC'
+          choosing-strategy: 'gerrit'
+
+    wrappers:
+      - fdio-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    triggers:
+      - gerrit:
+          server-name: 'Primary'
+          trigger-on:
+            - patchset-created-event:
+                exclude-drafts: 'true'
+                exclude-trivial-rebase: 'false'
+                exclude-no-code-change: 'true'
+            - draft-published-event
+            - comment-added-contains-event:
+                comment-contains-value: 'checkstylecheck'
+            - comment-added-contains-event:
+                comment-contains-value: 'docsonly'
+            - comment-added-contains-event:
+                comment-contains-value: 'recheck'
+            - comment-added-contains-event:
+                comment-contains-value: 'reverify'
+          projects:
+            - project-compare-type: 'ANT'
+              project-pattern: '{project}'
+              branches:
+                - branch-compare-type: 'ANT'
+                  branch-pattern: '**/{branch}'
+              file-paths:
+                - compare-type: REG_EXP
+                  pattern: ^((?!\/COMMIT_MSG|docs|_abc|_def[\/\.]).)*$
+              forbidden-file-paths:
+                - compare-type: REG_EXP
+                  pattern: .*docs\/.*
+                - compare-type: REG_EXP
+                  pattern: .*extras\/emacs\/.*
+              disable-strict-forbidden-file-verification: 'true'
+          override-votes: true
+          gerrit-build-notbuilt-verified-value: 0
+          gerrit-build-successful-verified-value: 1
+          # yamllint disable-line rule:line-length
+          notbuilt-message: 'Automatic retry of failed jobs may be in process. A proper vote should be set when retry completes.'
+          # yamllint disable-line rule:line-length
+          failed-message: 'Checkstyle failed. No further verify jobs will be started.'
+          successful-message: 'checkstyle_success'
+          skip-vote:
+            successful: true
+            failed: false
+            unstable: false
+            notbuilt: false
+
+    builders:
+      - shell:
+          !include-raw-escape: include-raw-hicn-checkstyle.sh
+
+    publishers:
+      - fdio-infra-shiplogs:
+          maven-version: 'mvn33-new'
+          archive-artifacts: '/tmp/hicn-failed-unittests/*/* **/core'
+      - naginator:
+          rerun-unstable-builds: true
+          max-failed-builds: 1
+          fixed-delay: 90
+
 - job-template:
     name: 'hicn-verify-{stream}-{os}'
 
       - maven-exec:
           maven-version: 'mvn33-new'
       - stream-parameter:
-          stream: '{stream}'
+          stream: 'release'
       - repo-name-parameter:
           repo-name: '{repo-stream-part}.{repo-os-part}'