e83e5a189bc3ee8ff288775ab20a12fe110a5508
[ci-management.git] / jjb / csit / csit-tox.yaml
1 # Copyright (c) 2022 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       - '2202':
29           branch: 'rls2202'
30       - '2206':
31           branch: 'rls2206'
32
33 - job-template:
34     name: 'csit-verify-tox-{stream}-{os}-{executor-arch}'
35
36     project-type: freestyle
37     node: 'builder-{os}-prod-{executor-arch}'
38     concurrent: true
39     latest-only: false
40
41     properties:
42       - lf-infra-properties:
43           build-days-to-keep: "{build-days-to-keep}"
44
45     parameters:
46       - project-parameter:
47           project: '{project}'
48       - gerrit-parameter:
49           branch: '{branch}'
50       - gerrit-refspec-parameter
51
52     scm:
53       - gerrit-trigger-scm:
54           credentials-id: 'jenkins-gerrit-credentials'
55           refspec: '$GERRIT_REFSPEC'
56           choosing-strategy: 'gerrit'
57
58     wrappers:
59       - fdio-infra-wrappers:
60           build-timeout: '{build-timeout}'
61
62     triggers:
63       # Tox trigger is special.
64       - gerrit:
65           server-name: 'Primary'
66           trigger-on:
67             - patchset-created-event:
68                 exclude-drafts: 'true'
69                 exclude-trivial-rebase: 'false'
70                 exclude-no-code-change: 'false'
71             # Not enabling on draft published event.
72             # Frequently, people publish for public access, not fr verify.
73             # Use recheck comment to trigger verify.
74             - comment-added-contains-event:
75                 comment-contains-value: 'recheck'
76             - comment-added-contains-event:
77                 comment-contains-value: 'reverify'
78           projects:
79             - project-compare-type: 'ANT'
80               project-pattern: '{project}'
81               branches:
82                 - branch-compare-type: 'ANT'
83                   branch-pattern: '**/{branch}'
84           override-votes: true
85           gerrit-build-notbuilt-verified-value: 0
86           gerrit-build-successful-verified-value: 1
87           failed-message: 'Tox failed. No further verify jobs will be started.'
88           successful-message: 'tox_success'
89           skip-vote:
90             successful: true
91             failed: false
92             unstable: false
93             notbuilt: false
94
95     builders:
96       - shell:
97           !include-raw-escape:
98           - ../scripts/setup_executor_env.sh
99       - shell:
100           !include-raw-escape:
101           - ../scripts/csit/tox.sh
102
103     publishers:
104       - fdio-infra-publish