Merge "CSIT: Convert jobs to ubuntu2004 part.IV"
[ci-management.git] / jjb / csit / csit-tox.yaml
1 # Copyright (c) 2021 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 ---
15 - project:
16     name: csit-validate
17
18     jobs:
19       - 'csit-verify-tox-{stream}-{os}-{executor-arch}'
20
21     project: 'csit'
22     branch: 'master'
23     os: 'ubuntu2004'
24     executor-arch: 'x86_64'
25     stream:
26       - master:
27           branch: 'master'
28       - '2005':
29           branch: 'rls2005'
30       - '2009':
31           branch: 'rls2009'
32       - '2009_lts':
33           branch: 'rls2009_lts'
34       - '2101':
35           branch: 'rls2101'
36
37 - job-template:
38     name: 'csit-verify-tox-{stream}-{os}-{executor-arch}'
39
40     project-type: freestyle
41     node: 'builder-{os}-prod-{executor-arch}'
42     concurrent: true
43     archive-artifacts: '*.log'
44     latest-only: false
45
46     build-discarder:
47       daysToKeep: '{build-days-to-keep}'
48       numToKeep: '{build-num-to-keep}'
49       artifactDaysToKeep: '{build-artifact-days-to-keep}'
50       artifactNumToKeep: '{build-artifact-num-to-keep}'
51
52     parameters:
53       - project-parameter:
54           project: '{project}'
55       - gerrit-parameter:
56           branch: '{branch}'
57       - gerrit-refspec-parameter
58       - string:
59           name: ARCHIVE_ARTIFACTS
60           default: '{archive-artifacts}'
61           description: Artifacts to archive to the logs server.
62
63     scm:
64       - gerrit-trigger-scm:
65           credentials-id: 'jenkins-gerrit-credentials'
66           refspec: '$GERRIT_REFSPEC'
67           choosing-strategy: 'gerrit'
68
69     wrappers:
70       - fdio-infra-wrappers:
71           build-timeout: '{build-timeout}'
72
73     triggers:
74       # Tox trigger is special.
75       - gerrit:
76           server-name: 'Primary'
77           trigger-on:
78             - patchset-created-event:
79                 exclude-drafts: 'true'
80                 exclude-trivial-rebase: 'false'
81                 exclude-no-code-change: 'false'
82             # Not enabling on draft published event.
83             # Frequently, people publish for public access, not fr verify.
84             # Use recheck comment to trigger verify.
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: 'ANT'
91               project-pattern: '{project}'
92               branches:
93                 - branch-compare-type: 'ANT'
94                   branch-pattern: '**/{branch}'
95           override-votes: true
96           gerrit-build-notbuilt-verified-value: 0
97           gerrit-build-successful-verified-value: 1
98           failed-message: 'Tox failed. No further verify jobs will be started.'
99           successful-message: 'tox_success'
100           skip-vote:
101             successful: true
102             failed: false
103             unstable: false
104             notbuilt: false
105
106     builders:
107       - shell:
108           !include-raw-escape:
109           - ../scripts/setup_executor_env.sh
110       - shell:
111           !include-raw-escape:
112           - ../scripts/csit/tox.sh
113
114     publishers:
115       # TODO: Remove this when a voting pylint difference checker
116       # with nice enough output is implemented.
117       - violations:
118           pylint:
119             min: 10
120             max: 250
121             unstable: 250
122             pattern: 'pylint.log'
123       - fdio-infra-shiplogs:
124           maven-version: 'mvn33-new'