Fine tune repos to enable lint jobs
[infra/cicd.git] / jjb / cloud-infra / cloud-infra-verify-lint.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: 'cloud-infra-lint'
22
23     project: 'cloud-infra-lint'
24
25     stream:
26       - 'master':
27           branch: '{stream}'
28           disabled: false
29
30     lint-type:
31       - ansible-lint:
32           repos-to-enable: 'infra\/engine|infra\/test|infra\/swconfig'
33       - yamllint:
34           repos-to-enable: 'infra\/engine|infra\/test|infra\/swconfig|infra\/hwconfig'
35       - shellcheck:
36           repos-to-enable: 'infra\/engine|infra\/test|infra\/swconfig'
37
38     jobs:
39       - 'cloud-infra-verify-engine-{lint-type}-{stream}'
40
41 - job-template:
42     name: 'cloud-infra-verify-engine-{lint-type}-{stream}'
43
44     disabled: '{obj:disabled}'
45
46     concurrent: true
47
48     node: infra-tools-docker-slave-ubuntu1804
49
50     parameters:
51       - project-parameters:
52           project: $GERRIT_PROJECT
53           branch: '{branch}'
54       - nordix-gerrit-parameters
55       - string:
56           name: LINT_TYPE
57           default: '{lint-type}'
58           description: 'Lint type to run'
59
60     properties:
61       - logrotate
62
63     wrappers:
64       - build-timeout:
65           timeout: 150
66       - fix-workspace-permissions
67
68     scm:
69       - git-scm-gerrit:
70           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
71           branch: '{branch}'
72           refspec: $GERRIT_REFSPEC
73           wipe_workspace: true
74           clean_before: false
75
76     triggers:
77       - gerrit:
78           server-name: 'Nordix Gerrit'
79           trigger-on:
80             - patchset-created-event:
81                 exclude-drafts: 'false'
82                 exclude-trivial-rebase: 'false'
83                 exclude-no-code-change: 'false'
84             - draft-published-event
85             - comment-added-contains-event:
86                 comment-contains-value: 'recheck'
87             - comment-added-contains-event:
88                 comment-contains-value: 'reverify'
89           projects:
90             - project-compare-type: 'REG_EXP'
91               project-pattern: '{repos-to-enable}'
92               branches:
93                 - branch-compare-type: 'ANT'
94                   branch-pattern: '**/{branch}'
95               disable-strict-forbidden-file-verification: 'false'
96               forbidden-file-paths:
97                 - compare-type: ANT
98                   pattern: 'docs/**|.gitignore'
99           custom-url: '* $JOB_NAME $BUILD_URL'
100
101     builders:
102       - 'cloud-infra-lint-macro'
103
104 # vim: set ts=2 sw=2 expandtab: