Linting should be done on a build server, not on master
[releng.git] / jjb / releng / opnfv-lint.yml
1 ---
2 ########################
3 # Job configuration for opnfv-lint
4 ########################
5 - project:
6
7     name: opnfv-lint
8
9     project: opnfv-lint
10
11     jobs:
12       - 'opnfv-lint-verify-{stream}'
13       - 'opnfv-yamllint-verify-{stream}'
14
15     stream:
16       - master:
17           branch: '{stream}'
18           gs-pathname: ''
19           disabled: false
20       - danube:
21           branch: 'stable/{stream}'
22           gs-pathname: '/{stream}'
23           disabled: false
24
25 ########################
26 # job templates
27 ########################
28
29 - job-template:
30     name: 'opnfv-lint-verify-{stream}'
31
32     disabled: '{obj:disabled}'
33
34     parameters:
35       - project-parameter:
36           project: $GERRIT_PROJECT
37           branch: '{branch}'
38       - node:
39           name: SLAVE_NAME
40           description: Slaves to execute yamllint
41           default-slaves:
42             - lf-build1
43           allowed-multiselect: true
44           ignore-offline-nodes: true
45
46     scm:
47       - git-scm-gerrit
48
49     triggers:
50       - gerrit:
51           server-name: 'gerrit.opnfv.org'
52           trigger-on:
53             - patchset-created-event:
54                 exclude-drafts: 'false'
55                 exclude-trivial-rebase: 'false'
56                 exclude-no-code-change: 'false'
57             - draft-published-event
58             - comment-added-contains-event:
59                 comment-contains-value: 'recheck'
60             - comment-added-contains-event:
61                 comment-contains-value: 'reverify'
62           projects:
63             - project-compare-type: 'REG_EXP'
64               project-pattern: 'releng|doctor'
65               branches:
66                 - branch-compare-type: 'ANT'
67                   branch-pattern: '**/{branch}'
68               file-paths:
69                 - compare-type: ANT
70                   pattern: '**/*.py'
71                 - compare-type: ANT
72                   pattern: '**/*.sh'
73                 - compare-type: ANT
74                   pattern: '**/*.yml'
75                 - compare-type: ANT
76                   pattern: '**/*.yaml'
77
78     builders:
79       - lint-all-code
80
81 - job-template:
82     name: 'opnfv-pylint-verify-{stream}'
83
84     disabled: '{obj:disabled}'
85
86     parameters:
87       - project-parameter:
88           project: $GERRIT_PROJECT
89           branch: '{branch}'
90       - node:
91           name: SLAVE_NAME
92           description: Slaves to execute yamllint
93           default-slaves:
94             - lf-build1
95           allowed-multiselect: true
96           ignore-offline-nodes: true
97
98     scm:
99       - git-scm-gerrit
100
101     triggers:
102       - gerrit:
103           server-name: 'gerrit.opnfv.org'
104           trigger-on:
105             - patchset-created-event:
106                 exclude-drafts: 'false'
107                 exclude-trivial-rebase: 'false'
108                 exclude-no-code-change: 'false'
109             - draft-published-event
110             - comment-added-contains-event:
111                 comment-contains-value: 'recheck'
112             - comment-added-contains-event:
113                 comment-contains-value: 'reverify'
114           projects:
115             - project-compare-type: 'REG_EXP'
116               project-pattern: 'functest|sdnvpn|qtip|daisy|sfc|escalator'
117               branches:
118                 - branch-compare-type: 'ANT'
119                   branch-pattern: '**/{branch}'
120               file-paths:
121                 - compare-type: ANT
122                   pattern: '**/*.py'
123
124     builders:
125       - lint-init
126       - lint-python-code
127       - lint-report
128
129 - job-template:
130     name: 'opnfv-yamllint-verify-{stream}'
131
132     disabled: '{obj:disabled}'
133
134     concurrent: true
135
136     parameters:
137       - project-parameter:
138           project: $GERRIT_PROJECT
139           branch: '{branch}'
140       - node:
141           name: SLAVE_NAME
142           description: Slaves to execute yamllint
143           default-slaves:
144             - lf-build1
145           allowed-multiselect: true
146           ignore-offline-nodes: true
147
148     scm:
149       - git-scm-gerrit
150
151     triggers:
152       - gerrit:
153           server-name: 'gerrit.opnfv.org'
154           trigger-on:
155             - patchset-created-event:
156                 exclude-drafts: 'false'
157                 exclude-trivial-rebase: 'false'
158                 exclude-no-code-change: 'false'
159             - draft-published-event
160             - comment-added-contains-event:
161                 comment-contains-value: 'recheck'
162             - comment-added-contains-event:
163                 comment-contains-value: 'reverify'
164           projects:
165             - project-compare-type: 'REG_EXP'
166               project-pattern: 'armband|fuel|octopus|pharos|releng-anteater'
167               branches:
168                 - branch-compare-type: 'ANT'
169                   branch-pattern: '**/{branch}'
170               file-paths:
171                 - compare-type: ANT
172                   pattern: '**/*.yml'
173                 - compare-type: ANT
174                   pattern: '**/*.yaml'
175
176     builders:
177       - lint-init
178       - lint-yaml-code
179       - lint-report