Use computes + control for NUM_OS_SYSTEM
[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     fraser: &fraser
23       stream: fraser
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           <<: *fraser
53       - virtual:
54           slave-label: compass-virtual-branch
55           installer: compass
56           auto-trigger-name: 'daily-trigger-disabled'
57           <<: *fraser
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
83     jobs:
84       - 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}'
85
86 ################################
87 # job templates
88 ################################
89 - job-template:
90     name: 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}'
91
92     wrappers:
93       - build-name:
94           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
95       - timeout:
96           timeout: 180
97           abort: true
98       - fix-workspace-permissions
99
100     triggers:
101       - '{auto-trigger-name}'
102
103     parameters:
104       - project-parameter:
105           project: '{project}'
106           branch: '{branch}'
107       - '{slave-label}-defaults'
108       - '{installer}-defaults'
109       - 'bottlenecks-params-{slave-label}'
110       - string:
111           name: REPO_DIR
112           default: "/home/opnfv/bottlenecks"
113           description: "Directory where the repository is cloned"
114       - string:
115           name: DEPLOY_SCENARIO
116           default: 'os-odl_l2-nofeature-ha'
117       - string:
118           name: GERRIT_REFSPEC_DEBUG
119           default: 'true'
120           description: "Gerrit refspec for debug."
121       - string:
122           name: SUITE_NAME
123           default: '{suite}'
124           description: "test suite name."
125       - string:
126           name: DOCKER_TAG
127           default: '{docker-tag}'
128           description: "docker image tag used for version control"
129
130     scm:
131       - git-scm
132
133     builders:
134       - 'bottlenecks-env-cleanup'
135       - 'bottlenecks-run-suite'
136       - 'bottlenecks-workspace-cleanup'
137
138     publishers:
139       - email:
140           recipients: gabriel.yuyang@huawei.com, liyin11@huawei.com
141       - email-jenkins-admins-on-failure
142
143 ########################
144 # builder macros
145 ########################
146 - builder:
147     name: bottlenecks-env-cleanup
148     builders:
149       - shell:
150           !include-raw: ./bottlenecks-cleanup.sh
151
152 - builder:
153     name: bottlenecks-run-suite
154     builders:
155       - shell:
156           !include-raw: ./bottlenecks-run-suite.sh
157
158 - builder:
159     name: bottlenecks-workspace-cleanup
160     builders:
161       - shell: |
162           #!/bin/bash
163           set -o errexit
164           set -o nounset
165           set -o pipefail
166
167           # delete everything that is in $WORKSPACE
168           sudo rm -rf $WORKSPACE
169
170 ####################
171 # parameter macros
172 ####################
173
174 - parameter:
175     name: 'bottlenecks-params-compass-baremetal-master'
176     parameters:
177       - string:
178           name: BOTTLENECKS_DB_TARGET
179           default: 'http://testresults.opnfv.org/test/api/v1/results'
180           description: 'Arguments to use in order to choose the backend DB'
181
182 - parameter:
183     name: 'bottlenecks-params-compass-virtual-master'
184     parameters:
185       - string:
186           name: BOTTLENECKS_DB_TARGET
187           default: 'http://testresults.opnfv.org/test/api/v1/results'
188           description: 'Arguments to use in order to choose the backend DB'
189
190 - parameter:
191     name: 'bottlenecks-params-compass-baremetal-branch'
192     parameters:
193       - string:
194           name: BOTTLENECKS_DB_TARGET
195           default: 'http://testresults.opnfv.org/test/api/v1/results'
196           description: 'Arguments to use in order to choose the backend DB'
197
198 - parameter:
199     name: 'bottlenecks-params-compass-virtual-branch'
200     parameters:
201       - string:
202           name: BOTTLENECKS_DB_TARGET
203           default: 'http://testresults.opnfv.org/test/api/v1/results'
204           description: 'Arguments to use in order to choose the backend DB'