INFRA: Switch to tox for JJB verify and merge jobs
[infra/cicd.git] / jjb / infra / jjb-verify-jobs.yaml
1 ---
2 # ============LICENSE_START====================================================
3 #  Copyright (C) 2020 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 # this job gets triggered when a change is proposed to cicd/jjb
20 # the change is verified using jenkins-jobs tox test command
21 # result will be send to Gerrit in the form of Verified +1 or -1
22
23 - project:
24     name: infra-jjb-verify
25     project: infra/cicd
26     stream:
27       - master:
28           branch: '{stream}'
29
30     lint-type:
31       - jjbtest
32       - shellcheck
33       - yamllint
34
35     jobs:
36       - infra-verify-cicd-jjb-{stream}
37       - infra-verify-cicd-{lint-type}-{stream}
38
39
40 - job-template:
41     name: infra-verify-cicd-jjb-{stream}
42     project-type: multijob
43     node: infra-tools-docker-slave-ubuntu1804
44     disabled: false
45     concurrent: true
46
47     parameters:
48       - project-parameters:
49           project: '{project}'
50           branch: '{branch}'
51           description: 'The project and branch which the change is proposed for'
52       - string:
53           name: VERBOSITY
54           default: 'false'
55           description: 'Verbosity setting for the lint script'
56       - nordix-gerrit-parameters
57
58     properties:
59       - logrotate
60
61     wrappers:
62       - build-timeout:
63           timeout: 60
64       - fix-workspace-permissions
65
66     scm:
67       - git-scm-gerrit:
68           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
69           branch: '{branch}'
70           refspec: $GERRIT_REFSPEC
71           wipe_workspace: true
72           clean_before: false
73
74     triggers:
75       - nordix-gerrit-trigger-patchset-created:
76           project: '{project}'
77           branch: '{branch}'
78           files: 'jjb/**'
79           skip-vote:
80             successful: false
81             failed: false
82             unstable: false
83             notbuilt: false
84
85     builders:
86       - multijob:
87           name: JJB Static Analysis
88           condition: ALWAYS
89           execution-type: PARALLEL
90           projects:
91             - name: 'infra-verify-cicd-jjbtest-{stream}'
92               current-parameters: true
93               kill-phase-on: NEVER
94               abort-all-job: false
95             - name: 'infra-verify-cicd-shellcheck-{stream}'
96               current-parameters: true
97               kill-phase-on: NEVER
98               abort-all-job: false
99             - name: 'infra-verify-cicd-yamllint-{stream}'
100               current-parameters: true
101               kill-phase-on: NEVER
102               abort-all-job: false
103
104 - job-template:
105     name: 'infra-verify-cicd-{lint-type}-{stream}'
106     node: infra-tools-docker-slave-ubuntu1804
107     disabled: '{obj:disabled}'
108     concurrent: true
109
110     parameters:
111       - string:
112           name: LINT_TYPE
113           default: '{lint-type}'
114           description: 'Lint type to run'
115
116     properties:
117       - logrotate
118
119     wrappers:
120       - build-timeout:
121           timeout: 150
122       - fix-workspace-permissions
123
124     scm:
125       - git-scm-gerrit:
126           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
127           branch: refs/heads/$GERRIT_BRANCH
128           refspec: $GERRIT_REFSPEC
129           wipe_workspace: true
130           clean_before: false
131
132     builders:
133       - shell:
134           !include-raw-escape: ./lint.sh
135
136 # vim: set ts=2 sw=2 ft=yaml expandtab: