Merge "Revert "Change prod & sandbox to public IPs for Ingress/Gerrit""
[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     properties:
44       - lf-infra-properties:
45           build-days-to-keep: "{build-days-to-keep}"
46
47     parameters:
48       - project-parameter:
49           project: '{project}'
50       - gerrit-parameter:
51           branch: '{branch}'
52       - gerrit-refspec-parameter
53
54     scm:
55       - gerrit-trigger-scm:
56           credentials-id: 'jenkins-gerrit-credentials'
57           refspec: '$GERRIT_REFSPEC'
58           choosing-strategy: 'gerrit'
59
60     wrappers:
61       - fdio-infra-wrappers:
62           build-timeout: '{build-timeout}'
63
64     triggers:
65       # Tox trigger is special.
66       - gerrit:
67           server-name: 'Primary'
68           trigger-on:
69             - patchset-created-event:
70                 exclude-drafts: 'true'
71                 exclude-trivial-rebase: 'false'
72                 exclude-no-code-change: 'false'
73             # Not enabling on draft published event.
74             # Frequently, people publish for public access, not fr verify.
75             # Use recheck comment to trigger verify.
76             - comment-added-contains-event:
77                 comment-contains-value: 'recheck'
78             - comment-added-contains-event:
79                 comment-contains-value: 'reverify'
80           projects:
81             - project-compare-type: 'ANT'
82               project-pattern: '{project}'
83               branches:
84                 - branch-compare-type: 'ANT'
85                   branch-pattern: '**/{branch}'
86           override-votes: true
87           gerrit-build-notbuilt-verified-value: 0
88           gerrit-build-successful-verified-value: 1
89           failed-message: 'Tox failed. No further verify jobs will be started.'
90           successful-message: 'tox_success'
91           skip-vote:
92             successful: true
93             failed: false
94             unstable: false
95             notbuilt: false
96
97     builders:
98       - shell:
99           !include-raw-escape:
100           - ../scripts/setup_executor_env.sh
101       - shell:
102           !include-raw-escape:
103           - ../scripts/csit/tox.sh
104
105     publishers:
106       - fdio-infra-publish