summaryrefslogtreecommitdiffstats
path: root/jjb/releng/opnfv-lint.yml
diff options
context:
space:
mode:
authorKingPoo <haojingbo@huawei.com>2016-12-09 03:49:24 -0500
committerKingPoo <haojingbo@huawei.com>2016-12-24 06:35:36 -0500
commitcc6e26648833778050e4a59096edee69b538f92b (patch)
tree380dd829df5a61da4df96896f180b09ec17c80b2 /jjb/releng/opnfv-lint.yml
parent59f96c0b4fb704339bf45c8af943070f6adcf7b9 (diff)
Add YAMLLint for static check
JIRA: OCTO-160 Current CI commit gate is simple, just have flake8 check in part of projects, it's better to apply more check tools to more projects. Yaml files could be checked by YAMLLint when the project is configed in releng. YAMLLint does not only check for syntax validity, but for weirdnesses like key repetition and cosmetic problems such as lines length, trailing spaces, indentation, etc. Change-Id: Ie90afd4a07ad10cc723f31efd35e5605f765583c Signed-off-by: KingPoo <haojingbo@huawei.com>
Diffstat (limited to 'jjb/releng/opnfv-lint.yml')
-rw-r--r--jjb/releng/opnfv-lint.yml51
1 files changed, 51 insertions, 0 deletions
diff --git a/jjb/releng/opnfv-lint.yml b/jjb/releng/opnfv-lint.yml
index 7115cce48..cd122d895 100644
--- a/jjb/releng/opnfv-lint.yml
+++ b/jjb/releng/opnfv-lint.yml
@@ -9,6 +9,7 @@
jobs:
- 'opnfv-lint-verify-{stream}'
+ - 'opnfv-yamllint-verify-{stream}'
stream:
- master:
@@ -64,3 +65,53 @@
builders:
- lint-python-code
- report-lint-result-to-gerrit
+
+- job-template:
+ name: 'opnfv-yamllint-verify-{stream}'
+
+ disabled: '{obj:disabled}'
+
+ parameters:
+ - project-parameter:
+ project: $GERRIT_PROJECT
+ - gerrit-parameter:
+ branch: '{branch}'
+ - node:
+ name: SLAVE_NAME
+ description: Slaves to execute yamllint
+ default-slaves:
+ - lf-build1
+ allowed-multiselect: true
+ ignore-offline-nodes: true
+
+ scm:
+ - git-scm-gerrit
+
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.opnfv.org'
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'false'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ projects:
+ - project-compare-type: 'REG_EXP'
+ project-pattern: 'compass4nfv'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ file-paths:
+ - compare-type: ANT
+ pattern: '**/*.yml'
+ - compare-type: ANT
+ pattern: '**/*.yaml'
+
+ builders:
+ - lint-yaml-code
+ - report-lint-result-to-gerrit