[ELIOT]Add verify job 40/440/3
authorwutianwei <wutianwei1@huawei.com>
Wed, 6 Mar 2019 08:21:19 +0000 (16:21 +0800)
committerwutianwei <wutianwei1@huawei.com>
Mon, 11 Mar 2019 06:48:04 +0000 (14:48 +0800)
Add a job to verify the eliot python code

Change-Id: I2bc4c329a6b51ddae25907194a8377e5644341d0
Signed-off-by: wutianwei <wutianwei1@huawei.com>
jjb/akraino-templates/akraino-jjb-templates.yaml
jjb/eliot/eliot.yaml
jjb/shell/eliot-verify.sh [new file with mode: 0644]

index bc03443..82cf085 100644 (file)
 
     publishers:
       - lf-infra-publish
+
+- job-template:
+    id: akraino-project-stream-verify
+    name: '{project}-{stream}-verify'
+    archive-artifacts: >
+      **/*.log
+    build-days-to-keep: 30
+    build-timeout: 60
+    stream: master
+    project-type: freestyle
+    submodule-recursive: true
+    node: '{build-node}'
+
+    properties:
+      - lf-infra-properties:
+          build-days-to-keep: '{build-days-to-keep}'
+
+    parameters:
+      - lf-infra-parameters:
+          project: '{project}'
+          branch: '{branch}'
+          stream: '{stream}'
+          lftools-version: '{lftools-version}'
+
+      - string:
+          name: ARCHIVE_ARTIFACTS
+          default: '{archive-artifacts}'
+          description: Artifacts to archive to the logs server.
+
+    wrappers:
+      - lf-infra-wrappers:
+          build-timeout: '{build-timeout}'
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+    scm:
+      - lf-infra-gerrit-scm:
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+          git-url: '{git-url}/{project}.git'
+          refspec: '{refspec}'
+          branch: '{branch}'
+          submodule-recursive: '{submodule-recursive}'
+          submodule-timeout: '{submodule-timeout}'
+          choosing-strategy: default
+
+    triggers:
+      - gerrit:
+          server-name: '{gerrit-server-name}'
+          trigger-on:
+            - patchset-created-event:
+                exclude-drafts: 'false'
+                exclude-trivial-rebase: 'false'
+                exclude-no-code-change: 'false'
+            - change-merged-event
+            - draft-published-event
+            - comment-added-contains-event:
+                comment-contains-value: remerge$
+            - 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: ANT
+                  pattern: '**/*'
+              disable-strict-forbidden-file-verification: 'true'
+              forbidden-file-paths:
+                - compare-type: ANT
+                  pattern: 'docs/**'
+          readable-message: true
+
+
+
+    builders:
+      - shell: !include-raw-escape:
+          - ../shell/eliot-verify.sh
+
+    publishers:
+      - lf-infra-publish
index 846967d..8c144a7 100644 (file)
@@ -1,6 +1,13 @@
 ---
 - project:
-    name: eliot-project-view
+    name: eliot-project
     project-name: eliot
+    project: eliot
+    stream: master
+    branch: master
+    refspec: refs/heads/master
+    build-node: centos7-builder-2c-1g
+    jobs:
+      - akraino-project-stream-verify
     views:
       - project-view
diff --git a/jjb/shell/eliot-verify.sh b/jjb/shell/eliot-verify.sh
new file mode 100644 (file)
index 0000000..1c80a16
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# Copyright (c) 2019 HUAWEI TECHNOLOGIES CO.,LTD and others. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -o errexit
+set -o pipefail
+
+echo "Running eliot verification..."
+
+/bin/bash $WORKSPACE/verify.sh