Merge "Add jjb script for nfvbench to build the nfvbench VM"
[releng.git] / jjb / multisite / multisite-daily-jobs.yml
1 - project:
2     name: kingbird
3
4     project: 'multisite'
5
6     jobs:
7         - 'multisite-kingbird-virtual-daily-{stream}'
8         - 'multisite-{phase}-{stream}'
9
10     phase:
11         - 'fuel-deploy-regionone-virtual':
12             slave-label: ericsson-virtual12
13         - 'fuel-deploy-regiontwo-virtual':
14             slave-label: ericsson-virtual13
15         - 'register-endpoints':
16             slave-label: ericsson-virtual12
17         - 'update-auth':
18             slave-label: ericsson-virtual13
19         - 'kingbird-deploy-virtual':
20             slave-label: ericsson-virtual12
21
22     stream:
23         - master:
24             branch: '{stream}'
25             gs-pathname: ''
26             disabled: false
27             timed: '0 12 * * *'
28         - danube:
29             branch: 'stable/{stream}'
30             gs-pathname: '/{stream}'
31             disabled: false
32             timed: '0 0 * * *'
33
34 - job-template:
35     name: 'multisite-kingbird-virtual-daily-{stream}'
36
37     project-type: multijob
38
39     disabled: '{obj:disabled}'
40
41     concurrent: false
42
43     parameters:
44         - project-parameter:
45             project: '{project}'
46             branch: '{branch}'
47         - choice:
48             name: FRESH_INSTALL
49             choices:
50                 - 'true'
51                 - 'false'
52         - string:
53             name: KINGBIRD_LOG_FILE
54             default: $WORKSPACE/kingbird.log
55         - 'opnfv-build-defaults'
56
57     triggers:
58          - timed: '{timed}'
59
60     builders:
61         - description-setter:
62             description: "Built on $NODE_NAME"
63         - multijob:
64             name: fuel-deploy-virtual
65             condition: SUCCESSFUL
66             projects:
67                 - name: 'multisite-fuel-deploy-regionone-virtual-{stream}'
68                   current-parameters: false
69                   predefined-parameters: |
70                     FUEL_VERSION=latest
71                     DEPLOY_SCENARIO=os-nosdn-nofeature-noha
72                     OS_REGION=RegionOne
73                     REGIONONE_IP=100.64.209.10
74                     REGIONTWO_IP=100.64.209.11
75                     FRESH_INSTALL=$FRESH_INSTALL
76                   node-parameters: false
77                   node-label-name: SLAVE_LABEL
78                   node-label: ericsson-virtual12
79                   kill-phase-on: FAILURE
80                   abort-all-job: true
81                 - name: 'multisite-fuel-deploy-regiontwo-virtual-{stream}'
82                   current-parameters: false
83                   predefined-parameters: |
84                     FUEL_VERSION=latest
85                     DEPLOY_SCENARIO=os-nosdn-nofeature-noha
86                     OS_REGION=RegionTwo
87                     REGIONONE_IP=100.64.209.10
88                     REGIONTWO_IP=100.64.209.11
89                     FRESH_INSTALL=$FRESH_INSTALL
90                   node-parameters: false
91                   node-label-name: SLAVE_LABEL
92                   node-label: ericsson-virtual13
93                   kill-phase-on: FAILURE
94                   abort-all-job: true
95         - multijob:
96             name: centralize-keystone
97             condition: SUCCESSFUL
98             projects:
99                 - name: 'multisite-register-endpoints-{stream}'
100                   current-parameters: false
101                   predefined-parameters: |
102                     OS_REGION=RegionOne
103                     REGIONONE_IP=100.64.209.10
104                     REGIONTWO_IP=100.64.209.11
105                     FRESH_INSTALL=$FRESH_INSTALL
106                   node-parameters: false
107                   node-label-name: SLAVE_LABEL
108                   node-label: ericsson-virtual12
109                   kill-phase-on: FAILURE
110                   abort-all-job: true
111                 - name: 'multisite-update-auth-{stream}'
112                   current-parameters: false
113                   predefined-parameters: |
114                     OS_REGION=RegionTwo
115                     REGIONONE_IP=100.64.209.10
116                     REGIONTWO_IP=100.64.209.11
117                     FRESH_INSTALL=$FRESH_INSTALL
118                   node-parameters: false
119                   node-label-name: SLAVE_LABEL
120                   node-label: ericsson-virtual13
121                   kill-phase-on: FAILURE
122                   abort-all-job: true
123         - multijob:
124             name: kingbird-deploy-virtual
125             condition: SUCCESSFUL
126             projects:
127                 - name: 'multisite-kingbird-deploy-virtual-{stream}'
128                   current-parameters: false
129                   predefined-parameters: |
130                     OS_REGION=RegionOne
131                     REGIONONE_IP=100.64.209.10
132                     REGIONTWO_IP=100.64.209.11
133                     FRESH_INSTALL=$FRESH_INSTALL
134                   node-parameters: false
135                   node-label-name: SLAVE_LABEL
136                   node-label: ericsson-virtual12
137                   kill-phase-on: FAILURE
138                   abort-all-job: true
139         - multijob:
140             name: kingbird-functest
141             condition: SUCCESSFUL
142             projects:
143                 - name: 'functest-fuel-virtual-suite-{stream}'
144                   current-parameters: false
145                   predefined-parameters: |
146                     DEPLOY_SCENARIO=os-nosdn-multisite-noha
147                     FUNCTEST_SUITE_NAME=multisite
148                     OS_REGION=RegionOne
149                     REGIONONE_IP=100.64.209.10
150                     REGIONTWO_IP=100.64.209.11
151                     FRESH_INSTALL=$FRESH_INSTALL
152                   node-parameters: false
153                   node-label-name: SLAVE_LABEL
154                   node-label: ericsson-virtual12
155                   kill-phase-on: NEVER
156                   abort-all-job: false
157
158 - job-template:
159     name: 'multisite-{phase}-{stream}'
160
161     concurrent: false
162
163     disabled: '{obj:disabled}'
164
165     concurrent: false
166
167     parameters:
168         - project-parameter:
169             project: '{project}'
170             branch: '{branch}'
171         - string:
172             name: KINGBIRD_LOG_FILE
173             default: $WORKSPACE/kingbird.log
174         - string:
175             name: GS_PATH
176             default: 'http://artifacts.opnfv.org/fuel{gs-pathname}'
177         - 'fuel-defaults'
178         - '{slave-label}-defaults'
179         - choice:
180             name: FRESH_INSTALL
181             choices:
182                 - 'true'
183                 - 'false'
184
185     scm:
186         - git-scm
187
188     builders:
189         - description-setter:
190             description: "Built on $NODE_NAME"
191         - 'multisite-{phase}-builder':
192             stream: '{stream}'
193
194     publishers:
195         - 'multisite-{phase}-publisher'
196         - email-jenkins-admins-on-failure
197
198 ########################
199 # builder macros
200 ########################
201 - builder:
202     name: 'multisite-fuel-deploy-regionone-virtual-builder'
203     builders:
204         - shell:
205             !include-raw-escape: ./fuel-deploy-for-multisite.sh
206         - shell: |
207             #!/bin/bash
208
209             echo "This is where we deploy fuel, extract passwords and save into file"
210
211             cd $WORKSPACE/tools/keystone/
212             ./run.sh -t controller -r fetchpass.sh -o servicepass.ini
213
214 - builder:
215     name: 'multisite-fuel-deploy-regiontwo-virtual-builder'
216     builders:
217         - shell:
218             !include-raw-escape: ./fuel-deploy-for-multisite.sh
219         - shell: |
220             #!/bin/bash
221
222             echo "This is where we deploy fuel, extract publicUrl, privateUrl, and adminUrl and save into file"
223
224             cd $WORKSPACE/tools/keystone/
225             ./run.sh -t controller -r endpoint.sh -o endpoints.ini
226 - builder:
227     name: 'multisite-register-endpoints-builder'
228     builders:
229         - copyartifact:
230             project: 'multisite-fuel-deploy-regiontwo-virtual-{stream}'
231             which-build: multijob-build
232             filter: "endpoints.ini"
233         - shell: |
234             #!/bin/bash
235
236             echo "This is where we register RegionTwo in RegionOne keystone using endpoints.ini"
237
238             cd $WORKSPACE/tools/keystone/
239             ./run.sh -t controller -r region.sh -d $WORKSPACE/endpoints.ini
240 - builder:
241     name: 'multisite-update-auth-builder'
242     builders:
243         - copyartifact:
244             project: 'multisite-fuel-deploy-regionone-virtual-{stream}'
245             which-build: multijob-build
246             filter: "servicepass.ini"
247         - shell: |
248             #!/bin/bash
249
250             echo "This is where we read passwords from servicepass.ini and replace passwords in RegionTwo"
251
252             cd $WORKSPACE/tools/keystone/
253             ./run.sh -t controller -r writepass.sh -d $WORKSPACE/servicepass.ini
254             ./run.sh -t compute -r writepass.sh -d $WORKSPACE/servicepass.ini
255 - builder:
256     name: 'multisite-kingbird-deploy-virtual-builder'
257     builders:
258         - shell: |
259             #!/bin/bash
260
261             echo "This is where we install kingbird"
262             cd $WORKSPACE/tools/kingbird
263             ./deploy.sh
264 ########################
265 # publisher macros
266 ########################
267 - publisher:
268     name: 'multisite-fuel-deploy-regionone-virtual-publisher'
269     publishers:
270         - archive:
271             artifacts: 'servicepass.ini'
272             allow-empty: false
273             only-if-success: true
274             fingerprint: true
275 - publisher:
276     name: 'multisite-fuel-deploy-regiontwo-virtual-publisher'
277     publishers:
278         - archive:
279             artifacts: 'endpoints.ini'
280             allow-empty: false
281             only-if-success: true
282             fingerprint: true
283 - publisher:
284     name: 'multisite-register-endpoints-publisher'
285     publishers:
286         - archive:
287             artifacts: 'dummy.txt'
288             allow-empty: true
289 - publisher:
290     name: 'multisite-update-auth-publisher'
291     publishers:
292         - archive:
293             artifacts: 'dummy.txt'
294             allow-empty: true
295 - publisher:
296     name: 'multisite-kingbird-deploy-virtual-publisher'
297     publishers:
298         - archive:
299             artifacts: 'dummy.txt'
300             allow-empty: true
301 - publisher:
302     name: 'multisite-kingbird-functest-publisher'
303     publishers:
304         - archive:
305             artifacts: 'dummy.txt'
306             allow-empty: true