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