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