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