merge GIT_BRANCH and GERRIT_BRANCH into BRANCH
[releng.git] / jjb / releng / opnfv-lint.yml
1 ########################
2 # Job configuration for opnfv-lint
3 ########################
4 - project:
5
6     name: opnfv-lint
7
8     project: opnfv-lint
9
10     jobs:
11         - 'opnfv-lint-verify-{stream}'
12         - 'opnfv-yamllint-verify-{stream}'
13
14     stream:
15         - master:
16             branch: '{stream}'
17             gs-pathname: ''
18             disabled: false
19         - danube:
20             branch: 'stable/{stream}'
21             gs-pathname: '/{stream}'
22             disabled: false
23
24 ########################
25 # job templates
26 ########################
27
28 - job-template:
29     name: 'opnfv-lint-verify-{stream}'
30
31     disabled: '{obj:disabled}'
32
33     parameters:
34         - project-parameter:
35             project: $GERRIT_PROJECT
36             branch: '{branch}'
37
38     scm:
39         - git-scm-gerrit
40
41     triggers:
42         - gerrit:
43             server-name: 'gerrit.opnfv.org'
44             trigger-on:
45                 - patchset-created-event:
46                     exclude-drafts: 'false'
47                     exclude-trivial-rebase: 'false'
48                     exclude-no-code-change: 'false'
49                 - draft-published-event
50                 - comment-added-contains-event:
51                     comment-contains-value: 'recheck'
52                 - comment-added-contains-event:
53                     comment-contains-value: 'reverify'
54             projects:
55               - project-compare-type: 'REG_EXP'
56                 project-pattern: 'functest|sdnvpn|qtip|daisy|sfc|escalator'
57                 branches:
58                   - branch-compare-type: 'ANT'
59                     branch-pattern: '**/{branch}'
60                 file-paths:
61                   - compare-type: ANT
62                     pattern: '**/*.py'
63
64     builders:
65         - lint-python-code
66         - report-lint-result-to-gerrit
67
68 - job-template:
69     name: 'opnfv-yamllint-verify-{stream}'
70
71     disabled: '{obj:disabled}'
72
73     concurrent: true
74
75     parameters:
76         - project-parameter:
77             project: $GERRIT_PROJECT
78             branch: '{branch}'
79         - node:
80             name: SLAVE_NAME
81             description: Slaves to execute yamllint
82             default-slaves:
83                 - lf-build1
84             allowed-multiselect: true
85             ignore-offline-nodes: true
86
87     scm:
88         - git-scm-gerrit
89
90     triggers:
91         - gerrit:
92             server-name: 'gerrit.opnfv.org'
93             trigger-on:
94                 - patchset-created-event:
95                     exclude-drafts: 'false'
96                     exclude-trivial-rebase: 'false'
97                     exclude-no-code-change: 'false'
98                 - draft-published-event
99                 - comment-added-contains-event:
100                     comment-contains-value: 'recheck'
101                 - comment-added-contains-event:
102                     comment-contains-value: 'reverify'
103             projects:
104               - project-compare-type: 'REG_EXP'
105                 project-pattern: 'compass4nfv'
106                 branches:
107                   - branch-compare-type: 'ANT'
108                     branch-pattern: '**/{branch}'
109                 file-paths:
110                   - compare-type: ANT
111                     pattern: '**/*.yml'
112                   - compare-type: ANT
113                     pattern: '**/*.yaml'
114
115     builders:
116         - lint-yaml-code
117         - report-lint-result-to-gerrit