engine: Implement change dependency handling
[infra/cicd.git] / jjb / engine / verify-jobs / ironic-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: 'ironic-tox'
22
23     project: 'ironic-tox'
24
25     stream:
26       - 'master':
27           branch: '{stream}'
28           gated-projects: 'infra/stack/ironic|infra/provisioner/bifrost'
29
30     lint-type:
31       - ansible-lint:
32           disabled: false
33           repos-to-ignore: ''
34       - shellcheck:
35           disabled: false
36           repos-to-ignore: ''
37       - yamllint:
38           disabled: false
39           repos-to-ignore: ''
40
41     jobs:
42       - 'ironic-verify-tox-{stream}'
43       - 'ironic-verify-{lint-type}-{stream}'
44
45 - job-template:
46     name: 'ironic-verify-tox-{stream}'
47
48     project-type: multijob
49
50     concurrent: true
51
52     node: infra-tools-docker-slave-ubuntu1804
53
54     parameters:
55       - project-parameters:
56           project: $GERRIT_PROJECT
57           branch: '{branch}'
58           description: 'The project and branch which the change is proposed for'
59       - string:
60           name: VERBOSITY
61           default: 'false'
62           description: 'Verbosity setting for the tox script'
63       - nordix-gerrit-parameters
64
65     properties:
66       - logrotate
67       # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
68       - throttle:
69           enabled: true
70           max-per-node: 1
71           max-total: 4
72           option: category
73           categories:
74             - engine-verify-tox
75
76     wrappers:
77       - build-timeout:
78           timeout: 60
79       - fix-workspace-permissions
80
81     scm:
82       - git-scm-gerrit:
83           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
84           branch: $GERRIT_BRANCH
85           refspec: $GERRIT_REFSPEC
86           wipe_workspace: true
87           clean_before: false
88
89     triggers:
90       - gerrit:
91           server-name: 'Nordix Gerrit'
92           trigger-on:
93             - patchset-created-event:
94                 exclude-drafts: 'false'
95                 exclude-trivial-rebase: 'false'
96                 exclude-no-code-change: 'false'
97             - draft-published-event
98             - comment-added-contains-event:
99                 comment-contains-value: 'recheck'
100             - comment-added-contains-event:
101                 comment-contains-value: 'reverify'
102           projects:
103             - project-compare-type: 'REG_EXP'
104               project-pattern: '{gated-projects}'
105               branches:
106                 - branch-compare-type: 'ANT'
107                   branch-pattern: '**/{branch}'
108               disable-strict-forbidden-file-verification: 'false'
109               forbidden-file-paths:
110                 - compare-type: ANT
111                   pattern: '.gitignore|.gitreview|.yamllint|README.md|bindep.txt|setup.cfg|setup.py'
112           custom-url: '* $JOB_NAME $BUILD_URL'
113           readable-message: 'true'
114
115     builders:
116       - multijob:
117           name: Static Analysis
118           condition: ALWAYS
119           execution-type: PARALLEL
120           projects:
121             - name: 'ironic-verify-ansible-lint-{stream}'
122               current-parameters: true
123               kill-phase-on: NEVER
124               abort-all-job: false
125             - name: 'ironic-verify-shellcheck-{stream}'
126               current-parameters: true
127               kill-phase-on: NEVER
128               abort-all-job: false
129             - name: 'ironic-verify-yamllint-{stream}'
130               current-parameters: true
131               kill-phase-on: NEVER
132               abort-all-job: false
133
134 - job-template:
135     name: 'ironic-verify-{lint-type}-{stream}'
136
137     disabled: '{obj:disabled}'
138
139     concurrent: true
140
141     node: infra-tools-docker-slave-ubuntu1804
142
143     parameters:
144       - string:
145           name: LINT_TYPE
146           default: '{lint-type}'
147           description: 'Lint type to run'
148       - string:
149           name: REPOS_TO_IGNORE
150           default: '{repos-to-ignore}'
151           description: 'Repos to ignore for the specific lint type'
152
153     properties:
154       - logrotate
155
156     wrappers:
157       - build-timeout:
158           timeout: 150
159       - fix-workspace-permissions
160
161     scm:
162       - git-scm-gerrit:
163           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
164           branch: $GERRIT_BRANCH
165           refspec: $GERRIT_REFSPEC
166           wipe_workspace: true
167           clean_before: false
168
169     builders:
170       - 'tox-macro'
171
172 # vim: set ts=2 sw=2 expandtab: