engine: Implement change dependency handling
[infra/cicd.git] / jjb / engine / verify-jobs / engine-verify-tox.yaml
1 ---
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2019 Nordix Foundation.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19
20 - project:
21     name: 'engine-tox'
22
23     project: 'engine-tox'
24
25     stream:
26       - 'master':
27           branch: '{stream}'
28           gated-projects: 'infra/engine|infra/hwconfig|infra/test|infra/provisioner/bifrost|infra/provisioner/heat'
29
30     lint-type:
31       - ansible-lint:
32           disabled: false
33           repos-to-ignore: 'infra/hwconfig'
34       - docs:
35           disabled: false
36           repos-to-ignore: 'infra/hwconfig|infra/test|infra/provisioner/bifrost|infra/provisioner/heat'
37       - shellcheck:
38           disabled: false
39           repos-to-ignore: 'infra/hwconfig'
40       - yamllint:
41           disabled: false
42           repos-to-ignore: ''
43
44     jobs:
45       - 'engine-verify-tox-{stream}'
46       - 'engine-verify-{lint-type}-{stream}'
47
48 - job-template:
49     name: 'engine-verify-tox-{stream}'
50
51     project-type: multijob
52
53     concurrent: true
54
55     node: infra-tools-docker-slave-ubuntu1804
56
57     parameters:
58       - project-parameters:
59           project: $GERRIT_PROJECT
60           branch: '{branch}'
61           description: 'The project and branch which the change is proposed for'
62       - string:
63           name: VERBOSITY
64           default: 'false'
65           description: 'Verbosity setting for the tox script'
66       - nordix-gerrit-parameters
67
68     properties:
69       - logrotate
70       # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
71       - throttle:
72           enabled: true
73           max-per-node: 1
74           max-total: 4
75           option: category
76           categories:
77             - engine-verify-tox
78
79     wrappers:
80       - build-timeout:
81           timeout: 60
82       - fix-workspace-permissions
83
84     scm:
85       - git-scm-gerrit:
86           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
87           branch: $GERRIT_BRANCH
88           refspec: $GERRIT_REFSPEC
89           wipe_workspace: true
90           clean_before: false
91
92     triggers:
93       - gerrit:
94           server-name: 'Nordix Gerrit'
95           trigger-on:
96             - patchset-created-event:
97                 exclude-drafts: 'false'
98                 exclude-trivial-rebase: 'false'
99                 exclude-no-code-change: 'false'
100             - draft-published-event
101             - comment-added-contains-event:
102                 comment-contains-value: 'recheck'
103             - comment-added-contains-event:
104                 comment-contains-value: 'reverify'
105           projects:
106             - project-compare-type: 'REG_EXP'
107               project-pattern: '{gated-projects}'
108               branches:
109                 - branch-compare-type: 'ANT'
110                   branch-pattern: '**/{branch}'
111               disable-strict-forbidden-file-verification: 'false'
112               forbidden-file-paths:
113                 - compare-type: ANT
114                   pattern: '.gitignore|.gitreview|.yamllint|README.md|bindep.txt|setup.cfg|setup.py'
115           custom-url: '* $JOB_NAME $BUILD_URL'
116           readable-message: 'true'
117
118     builders:
119       - multijob:
120           name: Static Analysis
121           condition: ALWAYS
122           execution-type: PARALLEL
123           projects:
124             - name: 'engine-verify-ansible-lint-{stream}'
125               current-parameters: true
126               kill-phase-on: NEVER
127               abort-all-job: false
128             - name: 'engine-verify-shellcheck-{stream}'
129               current-parameters: true
130               kill-phase-on: NEVER
131               abort-all-job: false
132             - name: 'engine-verify-yamllint-{stream}'
133               current-parameters: true
134               kill-phase-on: NEVER
135               abort-all-job: false
136             - name: 'engine-verify-docs-{stream}'
137               current-parameters: true
138               kill-phase-on: NEVER
139               abort-all-job: false
140
141 - job-template:
142     name: 'engine-verify-{lint-type}-{stream}'
143
144     disabled: '{obj:disabled}'
145
146     concurrent: true
147
148     node: infra-tools-docker-slave-ubuntu1804
149
150     parameters:
151       - string:
152           name: LINT_TYPE
153           default: '{lint-type}'
154           description: 'Lint type to run'
155       - string:
156           name: REPOS_TO_IGNORE
157           default: '{repos-to-ignore}'
158           description: 'Repos to ignore for the specific lint type'
159
160     properties:
161       - logrotate
162
163     wrappers:
164       - build-timeout:
165           timeout: 150
166       - fix-workspace-permissions
167
168     scm:
169       - git-scm-gerrit:
170           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
171           branch: $GERRIT_BRANCH
172           refspec: $GERRIT_REFSPEC
173           wipe_workspace: true
174           clean_before: false
175
176     builders:
177       - 'tox-macro'
178
179 # vim: set ts=2 sw=2 expandtab: