be17bf36cfab3700d82352cb8d2d6d6b3e0f9020
[infra/cicd.git] / jjb / engine / verify-jobs / kubernetes-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: 'kubernetes-tox'
22
23     project: 'kubernetes-tox'
24
25     # NOTE (fdegir): dot is not an allowed character in groovy var names and also for
26     # naming openstack objects so stream is used for that purpose but branch points to
27     # actual branch name on gerrit
28     stream:
29       - 'master':
30           branch: 'master'
31           gated-projects: 'infra/stack/kubernetes|infra/installer/kubespray'
32       - '1_17':
33           branch: '1.17'
34           gated-projects: 'infra/stack/kubernetes|infra/installer/kubespray'
35       - '1_15':
36           branch: '1.15'
37           gated-projects: 'infra/stack/kubernetes|infra/installer/kubespray'
38
39     lint-type:
40       - ansible-lint:
41           disabled: false
42           repos-to-ignore: ''
43       - shellcheck:
44           disabled: false
45           repos-to-ignore: ''
46       - yamllint:
47           disabled: false
48           repos-to-ignore: ''
49
50     jobs:
51       - 'kubernetes-verify-tox-{stream}'
52       - 'kubernetes-verify-{lint-type}-{stream}'
53
54 - job-template:
55     name: 'kubernetes-verify-tox-{stream}'
56
57     project-type: multijob
58
59     concurrent: true
60
61     node: infra-tools-docker-slave-ubuntu1804
62
63     parameters:
64       - project-parameters:
65           project: $GERRIT_PROJECT
66           branch: '{branch}'
67           description: 'The project and branch which the change is proposed for'
68       - string:
69           name: VERBOSITY
70           default: 'false'
71           description: 'Verbosity setting for the tox script'
72       - nordix-gerrit-parameters
73
74     properties:
75       - logrotate
76
77     wrappers:
78       - build-timeout:
79           timeout: 60
80       - fix-workspace-permissions
81
82     scm:
83       - git-scm-gerrit:
84           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
85           branch: $GERRIT_BRANCH
86           refspec: $GERRIT_REFSPEC
87           wipe_workspace: true
88           clean_before: false
89
90     triggers:
91       - gerrit:
92           server-name: 'Nordix Gerrit'
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: '{gated-projects}'
106               branches:
107                 - branch-compare-type: 'ANT'
108                   branch-pattern: '**/{branch}'
109               disable-strict-forbidden-file-verification: 'false'
110               forbidden-file-paths:
111                 - compare-type: ANT
112                   pattern: '.gitignore|.gitreview|.yamllint|README.md|bindep.txt|setup.cfg|setup.py'
113           custom-url: '* $JOB_NAME $BUILD_URL'
114
115     builders:
116       - multijob:
117           name: Static Analysis
118           condition: ALWAYS
119           execution-type: PARALLEL
120           projects:
121             - name: 'kubernetes-verify-ansible-lint-{stream}'
122               current-parameters: true
123               kill-phase-on: NEVER
124               abort-all-job: false
125             - name: 'kubernetes-verify-shellcheck-{stream}'
126               current-parameters: true
127               kill-phase-on: NEVER
128               abort-all-job: false
129             - name: 'kubernetes-verify-yamllint-{stream}'
130               current-parameters: true
131               kill-phase-on: NEVER
132               abort-all-job: false
133
134 - job-template:
135     name: 'kubernetes-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: