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