0a48eedf5c7b0d5db058fd46baf765f9b103eba2
[releng.git] / jjb / bottlenecks / bottlenecks-ci-jobs.yaml
1 ---
2 ####################################
3 # job configuration for bottlenecks
4 ####################################
5 - project:
6     name: bottlenecks-ci-jobs
7
8     project: 'bottlenecks'
9
10     # -------------------------------
11     # BRANCH ANCHORS
12     # -------------------------------
13     master: &master
14       stream: master
15       branch: '{stream}'
16       # This is used for common project file storage
17       gs-pathname: ''
18       # This is used for different test suite dependent packages storage
19       gs-packagepath: '/{suite}'
20       # docker tag used for version control
21       docker-tag: 'latest'
22     gambia: &gambia
23       stream: gambia
24       branch: 'stable/{stream}'
25       gs-pathname: '/{stream}'
26       gs-packagepath: '/{stream}/{suite}'
27       docker-tag: 'stable'
28     # -------------------------------
29     # POD, INSTALLER, AND BRANCH MAPPING
30     # -------------------------------
31     #    Installers using labels
32     #            CI PODs
33     # This section should only contain the installers
34     # that have been switched using labels for slaves
35     # -------------------------------
36     pod:
37       # compass CI PODs
38       - baremetal:
39           slave-label: compass-baremetal-master
40           installer: compass
41           auto-trigger-name: 'daily-trigger-disabled'
42           <<: *master
43       - virtual:
44           slave-label: compass-virtual-master
45           installer: compass
46           auto-trigger-name: 'daily-trigger-disabled'
47           <<: *master
48       - baremetal:
49           slave-label: compass-baremetal-branch
50           installer: compass
51           auto-trigger-name: 'daily-trigger-disabled'
52           <<: *gambia
53       - virtual:
54           slave-label: compass-virtual-branch
55           installer: compass
56           auto-trigger-name: 'daily-trigger-disabled'
57           <<: *gambia
58
59     # -------------------------------
60     #        None-CI PODs
61     # -------------------------------
62     # - orange-pod2:
63     #     slave-label: '{pod}'
64     #     installer: joid
65     #     auto-trigger-name: 'daily-trigger-disabled'
66     #     <<: *fraser
67     # - orange-pod2:
68     #     slave-label: '{pod}'
69     #     installer: joid
70     #     auto-trigger-name: 'daily-trigger-disabled'
71     #     <<: *master
72     # -------------------------------------------
73     suite:
74       - 'posca_stress_traffic'
75       - 'posca_stress_ping'
76       - 'posca_factor_multistack_storage'
77       - 'posca_factor_multistack_storage_parallel'
78       - 'posca_feature_moon_resources'
79       - 'posca_feature_moon_tenants'
80       - 'posca_feature_vnf_scale_out'
81       - 'posca_factor_soak_throughputs'
82       - 'kubestone_deployment_capacity'
83
84     jobs:
85       - 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}'
86
87 ################################
88 # job templates
89 ################################
90 - job-template:
91     name: 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}'
92
93     wrappers:
94       - build-name:
95           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
96       - timeout:
97           timeout: 180
98           abort: true
99       - fix-workspace-permissions
100
101     triggers:
102       - '{auto-trigger-name}'
103
104     parameters:
105       - project-parameter:
106           project: '{project}'
107           branch: '{branch}'
108       - '{slave-label}-defaults'
109       - '{installer}-defaults'
110       - 'bottlenecks-params-{slave-label}'
111       - string:
112           name: REPO_DIR
113           default: "/home/opnfv/bottlenecks"
114           description: "Directory where the repository is cloned"
115       - string:
116           name: DEPLOY_SCENARIO
117           default: 'os-odl_l2-nofeature-ha'
118       - string:
119           name: GERRIT_REFSPEC_DEBUG
120           default: 'true'
121           description: "Gerrit refspec for debug."
122       - string:
123           name: SUITE_NAME
124           default: '{suite}'
125           description: "test suite name."
126       - string:
127           name: DOCKER_TAG
128           default: '{docker-tag}'
129           description: "docker image tag used for version control"
130
131     scm:
132       - git-scm
133
134     builders:
135       - 'bottlenecks-env-cleanup'
136       - 'bottlenecks-run-suite'
137       - 'bottlenecks-workspace-cleanup'
138
139     publishers:
140       - email:
141           recipients: gabriel.yuyang@huawei.com, liyin11@huawei.com
142       - email-jenkins-admins-on-failure
143
144 ########################
145 # builder macros
146 ########################
147 - builder:
148     name: bottlenecks-env-cleanup
149     builders:
150       - shell:
151           !include-raw: ./bottlenecks-cleanup.sh
152
153 - builder:
154     name: bottlenecks-run-suite
155     builders:
156       - shell:
157           !include-raw: ./bottlenecks-run-suite.sh
158
159 - builder:
160     name: bottlenecks-workspace-cleanup
161     builders:
162       - shell: |
163           #!/bin/bash
164           set -o errexit
165           set -o nounset
166           set -o pipefail
167
168           # delete everything that is in $WORKSPACE
169           sudo rm -rf $WORKSPACE
170
171 ####################
172 # parameter macros
173 ####################
174
175 - parameter:
176     name: 'bottlenecks-params-compass-baremetal-master'
177     parameters:
178       - string:
179           name: BOTTLENECKS_DB_TARGET
180           default: 'http://testresults.opnfv.org/test/api/v1/results'
181           description: 'Arguments to use in order to choose the backend DB'
182
183 - parameter:
184     name: 'bottlenecks-params-compass-virtual-master'
185     parameters:
186       - string:
187           name: BOTTLENECKS_DB_TARGET
188           default: 'http://testresults.opnfv.org/test/api/v1/results'
189           description: 'Arguments to use in order to choose the backend DB'
190
191 - parameter:
192     name: 'bottlenecks-params-compass-baremetal-branch'
193     parameters:
194       - string:
195           name: BOTTLENECKS_DB_TARGET
196           default: 'http://testresults.opnfv.org/test/api/v1/results'
197           description: 'Arguments to use in order to choose the backend DB'
198
199 - parameter:
200     name: 'bottlenecks-params-compass-virtual-branch'
201     parameters:
202       - string:
203           name: BOTTLENECKS_DB_TARGET
204           default: 'http://testresults.opnfv.org/test/api/v1/results'
205           description: 'Arguments to use in order to choose the backend DB'