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