blob: ee7a5ed272c336d598a47f267a4a841a5fe65607 [file] [log] [blame]
Devin Limf5175192018-05-14 19:13:22 -07001// Copyright 2017 Open Networking Foundation (ONF)
2//
3// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
4// the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
5// or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
6//
7// TestON is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 2 of the License, or
10// (at your option) any later version.
11//
12// TestON is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with TestON. If not, see <http://www.gnu.org/licenses/>.
19
20// This is the Jenkins script for vm-pipeline-trigger or bm-pipeline-trigger
21
Devin Lim2edfcec2018-05-09 17:16:21 -070022#!groovy
23
Devin Limf5175192018-05-14 19:13:22 -070024// set the functions of the dependencies.
Devin Limb734ea52018-05-14 14:13:05 -070025funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
26test_lists = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy' )
27triggerFuncs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/TriggerFuncs.groovy' )
28fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy' )
Devin Lim2edfcec2018-05-09 17:16:21 -070029
Devin Limf5175192018-05-14 19:13:22 -070030// set the versions of the onos
Devin Limfe9a4cb2018-05-11 17:06:21 -070031fileRelated.init()
Devin Lim2edfcec2018-05-09 17:16:21 -070032current_version = "master"
33previous_version = "1.13"
34before_previous_version = "1.12"
Devin Limf5175192018-05-14 19:13:22 -070035
36// init trend graphs to be on VM.
Devin Lim2edfcec2018-05-09 17:16:21 -070037funcs.initializeTrend( "VM" );
38triggerFuncs.init( funcs )
Devin Limf5175192018-05-14 19:13:22 -070039
40// contents for page https://wiki.onosproject.org/display/ONOS/Automated+Test+Schedule
41// which will demonstrates the list of the scheduled tests on the days.
Devin Lim2edfcec2018-05-09 17:16:21 -070042wikiContents = ""
Devin Limf5175192018-05-14 19:13:22 -070043
44// default FUNC,HA to be VM, SCPF,USECASE to be BM.
45// SR will not be used in here.
Devin Lim2edfcec2018-05-09 17:16:21 -070046testcases = [
47 "FUNC" : [ tests : "" , nodeName : "VM", wikiContent : "" ],
48 "HA" : [ tests : "" , nodeName : "VM", wikiContent : "" ],
49 "SCPF" : [ tests : "" , nodeName : "BM", wikiContent : "" ],
50 "SR" : [ tests : "", nodeName : "Fabric", wikiContent : "" ],
51 "USECASE" : [ tests : "" , nodeName : "BM", wikiContent : "" ]
52]
Devin Limf5175192018-05-14 19:13:22 -070053
54// depends on the first two characters of the test name, it will be divided.
Devin Lim2edfcec2018-05-09 17:16:21 -070055Prefix_organizer = [
56 "FU" : "FUNC",
57 "HA" : "HA",
58 "PL" : "USECASE",
59 "SA" : "USECASE",
60 "SC" : "SCPF",
61 "SR" : "SR",
62 "US" : "USECASE",
63 "VP" : "USECASE"
64]
65
Devin Limf5175192018-05-14 19:13:22 -070066// read the parameters from the Jenkins
Devin Lim2edfcec2018-05-09 17:16:21 -070067manually_run = params.manual_run
Devin Limf5175192018-05-14 19:13:22 -070068
69// set default onos_b to be current_version.
Devin Lim2edfcec2018-05-09 17:16:21 -070070onos_b = current_version
71test_branch = ""
72onos_tag = params.ONOSTag
73isOldFlow = true
74
75// Set tests based on day of week
76def now = funcs.getCurrentTime()
77print now.toString()
78today = now[ Calendar.DAY_OF_WEEK ]
79
Devin Limf5175192018-05-14 19:13:22 -070080// get branch from parameter if it is manually running
Devin Lim2edfcec2018-05-09 17:16:21 -070081if ( manually_run ){
82 onos_b = params.ONOSVersion
83} else {
Devin Limf5175192018-05-14 19:13:22 -070084 // otherwise, the version would be different over the weekend.
85 // If today is weekdays, it will be default to current_version.
Devin Lim2edfcec2018-05-09 17:16:21 -070086 if ( today == Calendar.SATURDAY ){
87 onos_b = previous_version
88 } else if( today == Calendar.SUNDAY ){
89 onos_b = before_previous_version
90 }
91}
Devin Limf5175192018-05-14 19:13:22 -070092
93// Get all the list of the tests from the JenkinsTestONTests.groovy
Devin Lim2edfcec2018-05-09 17:16:21 -070094AllTheTests = test_lists.getAllTheTests( onos_b )
95
Devin Limf5175192018-05-14 19:13:22 -070096// list of the tests to be run will be saved in each choices.
Devin Lim2edfcec2018-05-09 17:16:21 -070097day = ""
98SCPF_choices = ""
99USECASE_choices = ""
100FUNC_choices = ""
101HA_choices = ""
102SR_choices = ""
Devin Limf5175192018-05-14 19:13:22 -0700103
104// init some paths for the files and directories.
Devin Limfe9a4cb2018-05-11 17:06:21 -0700105stat_graph_generator_file = fileRelated.histogramMultiple
106pie_graph_generator_file = fileRelated.pieMultiple
107graph_saved_directory = fileRelated.jenkinsWorkspace + "postjob-VM/"
Devin Lim2edfcec2018-05-09 17:16:21 -0700108
Devin Limf5175192018-05-14 19:13:22 -0700109// get post result from the params for manually run.
Devin Lim2edfcec2018-05-09 17:16:21 -0700110post_result = params.PostResult
Devin Limf5175192018-05-14 19:13:22 -0700111
112// if automatically run, it will remove the comma at the end after dividing the tests.
Devin Lim2edfcec2018-05-09 17:16:21 -0700113if( !manually_run ){
Devin Lim2edfcec2018-05-09 17:16:21 -0700114 testDivider( today )
115 FUNC_choices = triggerFuncs.lastCommaRemover( FUNC_choices )
116 HA_choices = triggerFuncs.lastCommaRemover( HA_choices )
117 SCPF_choices = triggerFuncs.lastCommaRemover( SCPF_choices )
118 USECASE_choices = triggerFuncs.lastCommaRemover( USECASE_choices )
119 SR_choices = triggerFuncs.lastCommaRemover( SR_choices )
120}
121
Devin Limf5175192018-05-14 19:13:22 -0700122
Devin Lim2edfcec2018-05-09 17:16:21 -0700123if ( manually_run ){
124 testcases = triggerFuncs.organize_tests( params.Tests, testcases )
125
126 isOldFlow = params.isOldFlow
127 println "Tests to be run manually : "
128}else{
129 testcases[ "SCPF" ][ "tests" ] = SCPF_choices
130 testcases[ "USECASE" ][ "tests" ] = USECASE_choices
131 testcases[ "FUNC" ][ "tests" ] = FUNC_choices
132 testcases[ "HA" ][ "tests" ] = HA_choices
133 testcases[ "SR" ][ "tests" ] = SR_choices
134 println "Defaulting to " + day + " tests:"
135}
136
137triggerFuncs.print_tests( testcases )
138
139def runTest = [
140 "VM" : [:],
141 "BM" : [:]
142]
Devin Limf5175192018-05-14 19:13:22 -0700143
144// set the test running function into the dictionary.
Devin Lim2edfcec2018-05-09 17:16:21 -0700145for( String test in testcases.keySet() ){
146 println test
147 if ( testcases[ test ][ "tests" ] != "" ){
148 runTest[ testcases[ test ][ "nodeName" ] ][ test ] = triggerFuncs.trigger_pipeline( onos_b, testcases[ test ][ "tests" ], testcases[ test ][ "nodeName" ], test, manually_run, onos_tag )
149 }
150}
151def finalList = [:]
Devin Limf5175192018-05-14 19:13:22 -0700152
153// get the name of the job.
Devin Limb91bf792018-05-10 15:09:52 -0700154jobName = env.JOB_NAME
Devin Limf5175192018-05-14 19:13:22 -0700155
156// first set the list of the functions to be run.
Devin Lim2edfcec2018-05-09 17:16:21 -0700157finalList[ "VM" ] = triggerFuncs.runTestSeq( runTest[ "VM" ] )
158finalList[ "BM" ] = triggerFuncs.runTestSeq( runTest[ "BM" ] )
Devin Limf5175192018-05-14 19:13:22 -0700159
160// if first two character of the job name is vm, only call VM.
161// else, only on BM
Devin Limb91bf792018-05-10 15:09:52 -0700162if( jobName.take( 2 ) == "vm" )
163 finalList[ "VM" ].call()
164else
165 finalList[ "BM" ].call()
Devin Lim2edfcec2018-05-09 17:16:21 -0700166
Devin Limf5175192018-05-14 19:13:22 -0700167// If it is automated running, it will generate the stats graph on VM.
Devin Lim2edfcec2018-05-09 17:16:21 -0700168if ( !manually_run ){
169 funcs.generateStatGraph( "TestStation-VMs",
170 funcs.branchWithPrefix( onos_b ),
171 AllTheTests,
172 stat_graph_generator_file,
173 pie_graph_generator_file,
174 graph_saved_directory )
175}
176
Devin Limf5175192018-05-14 19:13:22 -0700177// function that will divide tests depends on which day it is.
Devin Lim2edfcec2018-05-09 17:16:21 -0700178def testDivider( today ){
179 switch ( today ) {
180 case Calendar.MONDAY:
Devin Limf5175192018-05-14 19:13:22 -0700181 // THe reason Monday calls all the days is because we want to post the test schedules on the wiki
182 // and slack channel every monday.
183 // It will only generate the list of the test for monday.
Devin Lim2edfcec2018-05-09 17:16:21 -0700184 initHtmlForWiki()
185 monday( true )
186 tuesday( true, false )
187 wednesday( true, false )
188 thursday( true, false )
189 friday( true, false )
190 saturday( false, false )
191 sunday( false, false )
192 day = "Monday"
193 closeHtmlForWiki()
194 postToWiki( wikiContents )
195 slackSend( color:'#FFD988', message:"Tests to be run this weekdays : \n" + triggerFuncs.printDaysForTest( AllTheTests ) )
196 break
197 case Calendar.TUESDAY:
198 tuesday( false, true )
199 day = "Tuesday"
200 break
201 case Calendar.WEDNESDAY:
202 wednesday( false, true )
203 day = "Wednesday"
204 break
205 case Calendar.THURSDAY:
206 thursday( false, true )
207 day = "Thursday"
208 break
209 case Calendar.FRIDAY:
210 friday( false, true )
211 day = "Friday"
212 break
213 case Calendar.SATURDAY:
214 saturday( false, true )
215 day = "Saturday"
216 break
217 case Calendar.SUNDAY:
218 sunday( false , true )
219 day = "Sunday"
220 break
221 }
222}
Devin Limf5175192018-05-14 19:13:22 -0700223
224// function for monday.
Devin Lim2edfcec2018-05-09 17:16:21 -0700225def monday( getResult ){
Devin Limf5175192018-05-14 19:13:22 -0700226 // add header for wiki page script.
Devin Lim2edfcec2018-05-09 17:16:21 -0700227 addingHeader( "FUNC" )
Devin Limf5175192018-05-14 19:13:22 -0700228 // call category of basic and extra_A of FUNC tests.
229 // put M into the dictionary.
Devin Lim2edfcec2018-05-09 17:16:21 -0700230 FUNC_choices += adder( "FUNC", "basic", true, "M", getResult )
231 FUNC_choices += adder( "FUNC", "extra_A", true, "M", getResult )
232 closingHeader( "FUNC" )
233 addingHeader( "HA" )
234 HA_choices += adder( "HA", "basic", true, "M", getResult )
235 HA_choices += adder( "HA", "extra_A", true, "M", getResult )
236 closingHeader( "HA" )
237 addingHeader( "SCPF" )
238 SCPF_choices += adder( "SCPF", "basic", true, "M", getResult )
239 SCPF_choices += adder( "SCPF", "extra_B", true, "M", getResult )
240 closingHeader( "SCPF" )
241 addingHeader( "SR" )
242 SR_choices += adder( "SR", "basic", true, "M", false )
243 closingHeader( "SR" )
244 addingHeader( "USECASE" )
245 closingHeader( "USECASE" )
246}
Devin Limf5175192018-05-14 19:13:22 -0700247
248// If get result is false, it will not add the test result to xx_choices, but will generate the
249// header and days
Devin Lim2edfcec2018-05-09 17:16:21 -0700250def tuesday( getDay, getResult ){
251 addingHeader( "FUNC" )
252 FUNC_choices += adder( "FUNC", "basic", getDay, "T", getResult )
253 FUNC_choices += adder( "FUNC", "extra_B", getDay, "T", getResult )
254 closingHeader( "FUNC" )
255 addingHeader( "HA" )
256 HA_choices += adder( "HA", "basic", getDay, "T", getResult )
257 HA_choices += adder( "HA", "extra_B", getDay, "T", getResult )
258 closingHeader( "HA" )
259 addingHeader( "SCPF" )
260 SCPF_choices += adder( "SCPF", "basic", getDay, "T", getResult )
261 SCPF_choices += adder( "SCPF", "extra_C", getDay, "T", getResult )
262 closingHeader( "SCPF" )
263 addingHeader( "SR" )
264 SR_choices += adder( "SR", "basic", getDay, "T", false )
265 closingHeader( "SR" )
266 addingHeader( "USECASE" )
267 USECASE_choices += adder( "USECASE", "basic", getDay, "T", getResult )
268 USECASE_choices += adder( "USECASE", "extra_A", getDay, "T", getResult )
269 closingHeader( "USECASE" )
270}
271def wednesday( getDay, getResult ){
272 addingHeader( "FUNC" )
273 FUNC_choices += adder( "FUNC", "basic", getDay, "W", getResult )
274 FUNC_choices += adder( "FUNC", "extra_A", getDay, "W", getResult )
275 closingHeader( "FUNC" )
276 addingHeader( "HA" )
277 HA_choices += adder( "HA", "basic", getDay, "W", getResult )
278 HA_choices += adder( "HA", "extra_A", getDay, "W", getResult )
279 closingHeader( "HA" )
280 addingHeader( "SCPF" )
281 SCPF_choices += adder( "SCPF", "basic", getDay, "W", getResult )
282 SCPF_choices += adder( "SCPF", "extra_A", getDay, "W", getResult )
283 closingHeader( "SCPF" )
284 addingHeader( "SR" )
285 SR_choices += adder( "SR", "basic", getDay, "W", false )
286 closingHeader( "SR" )
287 addingHeader( "USECASE" )
288 closingHeader( "USECASE" )
289}
290def thursday( getDay, getResult ){
291 addingHeader( "FUNC" )
292 FUNC_choices += adder( "FUNC", "basic", getDay, "Th", getResult )
293 FUNC_choices += adder( "FUNC", "extra_B", getDay, "Th", getResult )
294 closingHeader( "FUNC" )
295 addingHeader( "HA" )
296 HA_choices += adder( "HA", "basic", getDay, "Th", getResult )
297 HA_choices += adder( "HA", "extra_B", getDay, "Th", getResult )
298 closingHeader( "HA" )
299 addingHeader( "SCPF" )
300 SCPF_choices += adder( "SCPF", "basic", getDay, "Th", getResult )
301 SCPF_choices += adder( "SCPF", "extra_B", getDay, "Th", getResult )
302 closingHeader( "SCPF" )
303 addingHeader( "SR" )
304 SR_choices += adder( "SR", "basic", getDay, "Th", false )
305 closingHeader( "SR" )
306 addingHeader( "USECASE" )
307 closingHeader( "USECASE" )
308}
309def friday( getDay, getResult ){
310 addingHeader( "FUNC" )
311 FUNC_choices += adder( "FUNC", "basic", getDay, "F", getResult )
312 FUNC_choices += adder( "FUNC", "extra_A", getDay, "F", getResult )
313 closingHeader( "FUNC" )
314 addingHeader( "HA" )
315 HA_choices += adder( "HA", "basic", getDay, "F", getResult )
316 HA_choices += adder( "HA", "extra_A", getDay, "F", getResult )
317 closingHeader( "HA" )
318 addingHeader( "SCPF" )
319 SCPF_choices += adder( "SCPF", "basic", getDay, "F", getResult )
320 SCPF_choices += adder( "SCPF", "extra_A", getDay, "F", getResult )
321 SCPF_choices += adder( "SCPF", "extra_D", getDay, "F", getResult )
322 closingHeader( "SCPF" )
323 addingHeader( "SR" )
324 SR_choices += adder( "SR", "basic", getDay, "F", false )
325 SR_choices += adder( "SR", "extra_A", getDay, "F", false )
326 closingHeader( "SR" )
327 addingHeader( "USECASE" )
328 closingHeader( "USECASE" )
329}
330def saturday( getDay, getResult ){
331 addingHeader( "FUNC" )
332 FUNC_choices += adder( "FUNC", "basic", getDay, "Sa", getResult )
333 FUNC_choices += adder( "FUNC", "extra_A", getDay, "Sa", getResult )
334 FUNC_choices += adder( "FUNC", "extra_B", getDay, "Sa", getResult )
335 closingHeader( "FUNC" )
336 addingHeader( "HA" )
337 HA_choices += adder( "HA", "basic", getDay, "Sa", getResult )
338 HA_choices += adder( "HA", "extra_A", getDay, "Sa", getResult )
339 HA_choices += adder( "HA", "extra_B", getDay, "Sa", getResult )
340 closingHeader( "HA" )
341 addingHeader( "SCPF" )
342 SCPF_choices += adder( "SCPF", "basic", getDay, "Sa", getResult )
343 SCPF_choices += adder( "SCPF", "extra_A", getDay, "Sa", getResult )
344 SCPF_choices += adder( "SCPF", "extra_B", getDay, "Sa", getResult )
345 SCPF_choices += adder( "SCPF", "extra_C", getDay, "Sa", getResult )
346 SCPF_choices += adder( "SCPF", "extra_D", getDay, "Sa", getResult )
347 closingHeader( "SCPF" )
348 addingHeader( "SR" )
349 SR_choices += adder( "SR", "basic", getDay, "Sa", false )
350 SR_choices += adder( "SR", "extra_B", getDay, "Sa", false )
351 closingHeader( "SR" )
352 addingHeader( "USECASE" )
353 USECASE_choices += adder( "USECASE", "basic", getDay, "Sa", getResult )
354 closingHeader( "USECASE" )
355}
356def sunday( getDay, getResult ){
357 addingHeader( "FUNC" )
358 FUNC_choices += adder( "FUNC", "basic", getDay, "S", getResult )
359 FUNC_choices += adder( "FUNC", "extra_A", getDay, "S", getResult )
360 FUNC_choices += adder( "FUNC", "extra_B", getDay, "S", getResult )
361 closingHeader( "FUNC" )
362 addingHeader( "HA" )
363 HA_choices += adder( "HA", "basic", getDay, "S", getResult )
364 HA_choices += adder( "HA", "extra_A", getDay, "S", getResult )
365 HA_choices += adder( "HA", "extra_B", getDay, "S", getResult )
366 closingHeader( "HA" )
367 addingHeader( "SCPF" )
368 SCPF_choices += adder( "SCPF", "basic", getDay, "S", getResult )
369 SCPF_choices += adder( "SCPF", "extra_A", getDay, "S", getResult )
370 SCPF_choices += adder( "SCPF", "extra_B", getDay, "S", getResult )
371 SCPF_choices += adder( "SCPF", "extra_C", getDay, "S", getResult )
372 SCPF_choices += adder( "SCPF", "extra_D", getDay, "S", getResult )
373 closingHeader( "SCPF" )
374 addingHeader( "SR" )
375 SR_choices += adder( "SR", "basic", getDay, "S", false )
376 closingHeader( "SR" )
377 addingHeader( "USECASE" )
378 USECASE_choices += adder( "USECASE", "basic", getDay, "S", getResult )
379 closingHeader( "USECASE" )
380}
Devin Limf5175192018-05-14 19:13:22 -0700381
382// adder that will return the list of the tests.
Devin Lim2edfcec2018-05-09 17:16:21 -0700383def adder( testCat, set, dayAdding, day, getResult ){
Devin Limf5175192018-05-14 19:13:22 -0700384 // testCat : the category of the test which will be either FUNC,HA,SR...
385 // set : the set of the test to be run which will be basic,extra_A,extra_B...
386 // dayAdding : boolean whether to add the days into the list or not
387 // day : the day you are trying to add (m,t,w,th... )
388 // getResult : if want to get the list of the test to be run. False will return empty list.
389 // And once the list is empty, it will not be run.
Devin Lim2edfcec2018-05-09 17:16:21 -0700390 result = ""
391 for( String test in AllTheTests[ testCat ].keySet() ){
392 if( AllTheTests[ testCat ][ test ][ set ] ){
393 if( getResult )
394 result += test + ","
395 if( dayAdding )
396 dayAdder( testCat, test, day )
Devin Limf5175192018-05-14 19:13:22 -0700397 // make HTML columns for wiki page on schedule.
Devin Lim2edfcec2018-05-09 17:16:21 -0700398 makeHtmlColList( testCat, test )
399 }
400 }
401 return result
402}
Devin Limf5175192018-05-14 19:13:22 -0700403
404// Initial part of the wiki page.
Devin Lim2edfcec2018-05-09 17:16:21 -0700405def initHtmlForWiki(){
406 wikiContents = '''
407 <table class="wrapped confluenceTable">
408 <colgroup>
409 <col />
410 <col />
411 <col />
412 <col />
413 <col />
414 <col />
415 </colgroup>
416 <tbody>
417 <tr>
418 <th colspan="1" class="confluenceTh">
419 <br />
420 </th>
421 <th class="confluenceTh"><p>Monday</p></th>
422 <th class="confluenceTh"><p>Tuesday</p></th>
423 <th class="confluenceTh"><p>Wednesday</p></th>
424 <th class="confluenceTh"><p>Thursday</p></th>
425 <th class="confluenceTh"><p>Friday</p></th>
426 <th class="confluenceTh"><p>Saturday</p></th>
427 <th class="confluenceTh"><p>Sunday</p></th>
428 </tr>'''
429 for( String test in testcases.keySet() ){
430 testcases[ test ][ 'wikiContent' ] = '''
431 <tr>
432 <th colspan="1" class="confluenceTh">''' + test + '''</th>'''
433 }
434}
Devin Limf5175192018-05-14 19:13:22 -0700435
436// adding header functionality.
Devin Lim2edfcec2018-05-09 17:16:21 -0700437def addingHeader( testCategory ){
438 testcases[ testCategory ][ 'wikiContent' ] += '''
439 <td class="confluenceTd">
440 <ul>'''
441}
Devin Limf5175192018-05-14 19:13:22 -0700442
443// making column list for html
Devin Lim2edfcec2018-05-09 17:16:21 -0700444def makeHtmlColList( testCategory, testName ){
445 testcases[ testCategory ][ 'wikiContent' ] += '''
446 <li>'''+ testName +'''</li>'''
447
448}
Devin Limf5175192018-05-14 19:13:22 -0700449
450// closing the header for html
Devin Lim2edfcec2018-05-09 17:16:21 -0700451def closingHeader( testCategory ){
452 testcases[ testCategory ][ 'wikiContent' ] += '''
453 </ul>
454 </td>'''
455}
Devin Limf5175192018-05-14 19:13:22 -0700456
457// close the html for the wiki page.
Devin Lim2edfcec2018-05-09 17:16:21 -0700458def closeHtmlForWiki(){
459 for( String test in testcases.keySet() ){
460 wikiContents += testcases[ test ][ 'wikiContent' ]
461 wikiContents += '''
462 </tr>'''
463 }
464 wikiContents += '''
465 </tbody>
466 </table>
467 <p><strong>Everyday</strong>, all SegmentRouting tests are built and run on every supported branch.</p>
468 <p>On <strong>Weekdays</strong>, all the other tests are built and run on the master branch.</p>
469 <p>On <strong>Saturdays</strong>, all the other tests are built and run on the '''+ funcs.branchWithPrefix( previous_version ) +''' branch.</p>
470 <p>On <strong>Sundays</strong>, all the other tests are built and run on the '''+ funcs.branchWithPrefix( before_previous_version ) +''' branch.</p>'''
471}
Devin Limf5175192018-05-14 19:13:22 -0700472
473// post the result to wiki page using publish to confluence.
Devin Lim2edfcec2018-05-09 17:16:21 -0700474def postToWiki( contents ){
475 node( testMachine ){
Devin Limfe9a4cb2018-05-11 17:06:21 -0700476 workspace = fileRelated.jenkinsWorkspace + "all-pipeline-trigger/"
Devin Lim2edfcec2018-05-09 17:16:21 -0700477 filename = "jenkinsSchedule.txt"
478 writeFile file: workspace + filename, text: contents
479 funcs.publishToConfluence( "false", "true",
480 "Automated Test Schedule",
481 workspace + filename )
482 }
483}
Devin Limf5175192018-05-14 19:13:22 -0700484
485// add the day to the "day" on the dictionary.
Devin Lim2edfcec2018-05-09 17:16:21 -0700486def dayAdder( testCat, testName, dayOfWeek ){
487 AllTheTests[ testCat ][ testName ][ "day" ] += dayOfWeek + ","
488}