blob: 729cb8913f3dc24bc2a60c7c0f3369e5199ad7ef [file] [log] [blame]
Devin Lime1346f42018-05-15 15:41:36 -07001#!groovy
Devin Limf5175192018-05-14 19:13:22 -07002// Copyright 2017 Open Networking Foundation (ONF)
3//
4// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
5// the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
6// or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
7//
8// TestON is free software: you can redistribute it and/or modify
9// it under the terms of the GNU General Public License as published by
10// the Free Software Foundation, either version 2 of the License, or
11// (at your option) any later version.
12//
13// TestON is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with TestON. If not, see <http://www.gnu.org/licenses/>.
20
21// This is the Jenkins script for vm-pipeline-trigger or bm-pipeline-trigger
22
Devin Limf5175192018-05-14 19:13:22 -070023// set the functions of the dependencies.
Devin Limb734ea52018-05-14 14:13:05 -070024funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
25test_lists = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy' )
26triggerFuncs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/TriggerFuncs.groovy' )
27fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy' )
Devin Lim2edfcec2018-05-09 17:16:21 -070028
Devin Limf5175192018-05-14 19:13:22 -070029// set the versions of the onos
Devin Limfe9a4cb2018-05-11 17:06:21 -070030fileRelated.init()
Devin Lim2edfcec2018-05-09 17:16:21 -070031current_version = "master"
32previous_version = "1.13"
33before_previous_version = "1.12"
Devin Limf5175192018-05-14 19:13:22 -070034
35// init trend graphs to be on VM.
Devin Lim2edfcec2018-05-09 17:16:21 -070036funcs.initializeTrend( "VM" );
37triggerFuncs.init( funcs )
Devin Limf5175192018-05-14 19:13:22 -070038
39// contents for page https://wiki.onosproject.org/display/ONOS/Automated+Test+Schedule
40// which will demonstrates the list of the scheduled tests on the days.
Devin Lim2edfcec2018-05-09 17:16:21 -070041wikiContents = ""
Devin Limf5175192018-05-14 19:13:22 -070042
43// default FUNC,HA to be VM, SCPF,USECASE to be BM.
44// SR will not be used in here.
Devin Lim2edfcec2018-05-09 17:16:21 -070045testcases = [
46 "FUNC" : [ tests : "" , nodeName : "VM", wikiContent : "" ],
47 "HA" : [ tests : "" , nodeName : "VM", wikiContent : "" ],
48 "SCPF" : [ tests : "" , nodeName : "BM", wikiContent : "" ],
49 "SR" : [ tests : "", nodeName : "Fabric", wikiContent : "" ],
50 "USECASE" : [ tests : "" , nodeName : "BM", wikiContent : "" ]
51]
Devin Limf5175192018-05-14 19:13:22 -070052
53// depends on the first two characters of the test name, it will be divided.
Devin Lim2edfcec2018-05-09 17:16:21 -070054Prefix_organizer = [
55 "FU" : "FUNC",
56 "HA" : "HA",
57 "PL" : "USECASE",
58 "SA" : "USECASE",
59 "SC" : "SCPF",
60 "SR" : "SR",
61 "US" : "USECASE",
62 "VP" : "USECASE"
63]
64
Devin Limf5175192018-05-14 19:13:22 -070065// read the parameters from the Jenkins
Devin Lim2edfcec2018-05-09 17:16:21 -070066manually_run = params.manual_run
Devin Limf5175192018-05-14 19:13:22 -070067
68// set default onos_b to be current_version.
Devin Lim2edfcec2018-05-09 17:16:21 -070069onos_b = current_version
70test_branch = ""
71onos_tag = params.ONOSTag
72isOldFlow = true
73
74// Set tests based on day of week
75def now = funcs.getCurrentTime()
76print now.toString()
77today = now[ Calendar.DAY_OF_WEEK ]
78
Devin Limf5175192018-05-14 19:13:22 -070079// get branch from parameter if it is manually running
Devin Lim2edfcec2018-05-09 17:16:21 -070080if ( manually_run ){
81 onos_b = params.ONOSVersion
82} else {
Devin Limf5175192018-05-14 19:13:22 -070083 // otherwise, the version would be different over the weekend.
84 // If today is weekdays, it will be default to current_version.
Devin Lim2edfcec2018-05-09 17:16:21 -070085 if ( today == Calendar.SATURDAY ){
86 onos_b = previous_version
87 } else if( today == Calendar.SUNDAY ){
88 onos_b = before_previous_version
89 }
90}
Devin Limf5175192018-05-14 19:13:22 -070091
92// Get all the list of the tests from the JenkinsTestONTests.groovy
Devin Lim2edfcec2018-05-09 17:16:21 -070093AllTheTests = test_lists.getAllTheTests( onos_b )
94
Devin Limf5175192018-05-14 19:13:22 -070095// list of the tests to be run will be saved in each choices.
Devin Lim2edfcec2018-05-09 17:16:21 -070096day = ""
97SCPF_choices = ""
98USECASE_choices = ""
99FUNC_choices = ""
100HA_choices = ""
101SR_choices = ""
Devin Limf5175192018-05-14 19:13:22 -0700102
103// init some paths for the files and directories.
Devin Limfe9a4cb2018-05-11 17:06:21 -0700104stat_graph_generator_file = fileRelated.histogramMultiple
105pie_graph_generator_file = fileRelated.pieMultiple
106graph_saved_directory = fileRelated.jenkinsWorkspace + "postjob-VM/"
Devin Lim2edfcec2018-05-09 17:16:21 -0700107
Devin Limf5175192018-05-14 19:13:22 -0700108// get post result from the params for manually run.
Devin Lim2edfcec2018-05-09 17:16:21 -0700109post_result = params.PostResult
Devin Limf5175192018-05-14 19:13:22 -0700110
111// if automatically run, it will remove the comma at the end after dividing the tests.
Devin Lim2edfcec2018-05-09 17:16:21 -0700112if( !manually_run ){
Devin Lim2edfcec2018-05-09 17:16:21 -0700113 testDivider( today )
114 FUNC_choices = triggerFuncs.lastCommaRemover( FUNC_choices )
115 HA_choices = triggerFuncs.lastCommaRemover( HA_choices )
116 SCPF_choices = triggerFuncs.lastCommaRemover( SCPF_choices )
117 USECASE_choices = triggerFuncs.lastCommaRemover( USECASE_choices )
118 SR_choices = triggerFuncs.lastCommaRemover( SR_choices )
119}
120
Devin Limf5175192018-05-14 19:13:22 -0700121
Devin Lim2edfcec2018-05-09 17:16:21 -0700122if ( manually_run ){
123 testcases = triggerFuncs.organize_tests( params.Tests, testcases )
124
125 isOldFlow = params.isOldFlow
126 println "Tests to be run manually : "
127}else{
128 testcases[ "SCPF" ][ "tests" ] = SCPF_choices
129 testcases[ "USECASE" ][ "tests" ] = USECASE_choices
130 testcases[ "FUNC" ][ "tests" ] = FUNC_choices
131 testcases[ "HA" ][ "tests" ] = HA_choices
132 testcases[ "SR" ][ "tests" ] = SR_choices
133 println "Defaulting to " + day + " tests:"
134}
135
136triggerFuncs.print_tests( testcases )
137
138def runTest = [
139 "VM" : [:],
140 "BM" : [:]
141]
Devin Limf5175192018-05-14 19:13:22 -0700142
143// set the test running function into the dictionary.
Devin Lim2edfcec2018-05-09 17:16:21 -0700144for( String test in testcases.keySet() ){
145 println test
146 if ( testcases[ test ][ "tests" ] != "" ){
147 runTest[ testcases[ test ][ "nodeName" ] ][ test ] = triggerFuncs.trigger_pipeline( onos_b, testcases[ test ][ "tests" ], testcases[ test ][ "nodeName" ], test, manually_run, onos_tag )
148 }
149}
150def finalList = [:]
Devin Limf5175192018-05-14 19:13:22 -0700151
152// get the name of the job.
Devin Limb91bf792018-05-10 15:09:52 -0700153jobName = env.JOB_NAME
Devin Limf5175192018-05-14 19:13:22 -0700154
155// first set the list of the functions to be run.
Devin Lim2edfcec2018-05-09 17:16:21 -0700156finalList[ "VM" ] = triggerFuncs.runTestSeq( runTest[ "VM" ] )
157finalList[ "BM" ] = triggerFuncs.runTestSeq( runTest[ "BM" ] )
Devin Limf5175192018-05-14 19:13:22 -0700158
159// if first two character of the job name is vm, only call VM.
160// else, only on BM
Devin Limb91bf792018-05-10 15:09:52 -0700161if( jobName.take( 2 ) == "vm" )
162 finalList[ "VM" ].call()
163else
164 finalList[ "BM" ].call()
Devin Lim2edfcec2018-05-09 17:16:21 -0700165
Devin Limf5175192018-05-14 19:13:22 -0700166// If it is automated running, it will generate the stats graph on VM.
Devin Lim2edfcec2018-05-09 17:16:21 -0700167if ( !manually_run ){
168 funcs.generateStatGraph( "TestStation-VMs",
169 funcs.branchWithPrefix( onos_b ),
170 AllTheTests,
171 stat_graph_generator_file,
172 pie_graph_generator_file,
173 graph_saved_directory )
174}
175
Devin Limf5175192018-05-14 19:13:22 -0700176// function that will divide tests depends on which day it is.
Devin Lim2edfcec2018-05-09 17:16:21 -0700177def testDivider( today ){
178 switch ( today ) {
179 case Calendar.MONDAY:
Devin Limf5175192018-05-14 19:13:22 -0700180 // THe reason Monday calls all the days is because we want to post the test schedules on the wiki
181 // and slack channel every monday.
182 // It will only generate the list of the test for monday.
Devin Lim2edfcec2018-05-09 17:16:21 -0700183 initHtmlForWiki()
184 monday( true )
185 tuesday( true, false )
186 wednesday( true, false )
187 thursday( true, false )
188 friday( true, false )
189 saturday( false, false )
190 sunday( false, false )
191 day = "Monday"
192 closeHtmlForWiki()
193 postToWiki( wikiContents )
194 slackSend( color:'#FFD988', message:"Tests to be run this weekdays : \n" + triggerFuncs.printDaysForTest( AllTheTests ) )
195 break
196 case Calendar.TUESDAY:
197 tuesday( false, true )
198 day = "Tuesday"
199 break
200 case Calendar.WEDNESDAY:
201 wednesday( false, true )
202 day = "Wednesday"
203 break
204 case Calendar.THURSDAY:
205 thursday( false, true )
206 day = "Thursday"
207 break
208 case Calendar.FRIDAY:
209 friday( false, true )
210 day = "Friday"
211 break
212 case Calendar.SATURDAY:
213 saturday( false, true )
214 day = "Saturday"
215 break
216 case Calendar.SUNDAY:
217 sunday( false , true )
218 day = "Sunday"
219 break
220 }
221}
Devin Limf5175192018-05-14 19:13:22 -0700222
223// function for monday.
Devin Lim2edfcec2018-05-09 17:16:21 -0700224def monday( getResult ){
Devin Limf5175192018-05-14 19:13:22 -0700225 // add header for wiki page script.
Devin Lim2edfcec2018-05-09 17:16:21 -0700226 addingHeader( "FUNC" )
Devin Limf5175192018-05-14 19:13:22 -0700227 // call category of basic and extra_A of FUNC tests.
228 // put M into the dictionary.
Devin Lim2edfcec2018-05-09 17:16:21 -0700229 FUNC_choices += adder( "FUNC", "basic", true, "M", getResult )
230 FUNC_choices += adder( "FUNC", "extra_A", true, "M", getResult )
231 closingHeader( "FUNC" )
232 addingHeader( "HA" )
233 HA_choices += adder( "HA", "basic", true, "M", getResult )
234 HA_choices += adder( "HA", "extra_A", true, "M", getResult )
235 closingHeader( "HA" )
236 addingHeader( "SCPF" )
237 SCPF_choices += adder( "SCPF", "basic", true, "M", getResult )
238 SCPF_choices += adder( "SCPF", "extra_B", true, "M", getResult )
239 closingHeader( "SCPF" )
240 addingHeader( "SR" )
241 SR_choices += adder( "SR", "basic", true, "M", false )
242 closingHeader( "SR" )
243 addingHeader( "USECASE" )
244 closingHeader( "USECASE" )
245}
Devin Limf5175192018-05-14 19:13:22 -0700246
247// If get result is false, it will not add the test result to xx_choices, but will generate the
248// header and days
Devin Lim2edfcec2018-05-09 17:16:21 -0700249def tuesday( getDay, getResult ){
250 addingHeader( "FUNC" )
251 FUNC_choices += adder( "FUNC", "basic", getDay, "T", getResult )
252 FUNC_choices += adder( "FUNC", "extra_B", getDay, "T", getResult )
253 closingHeader( "FUNC" )
254 addingHeader( "HA" )
255 HA_choices += adder( "HA", "basic", getDay, "T", getResult )
256 HA_choices += adder( "HA", "extra_B", getDay, "T", getResult )
257 closingHeader( "HA" )
258 addingHeader( "SCPF" )
259 SCPF_choices += adder( "SCPF", "basic", getDay, "T", getResult )
260 SCPF_choices += adder( "SCPF", "extra_C", getDay, "T", getResult )
261 closingHeader( "SCPF" )
262 addingHeader( "SR" )
263 SR_choices += adder( "SR", "basic", getDay, "T", false )
264 closingHeader( "SR" )
265 addingHeader( "USECASE" )
266 USECASE_choices += adder( "USECASE", "basic", getDay, "T", getResult )
267 USECASE_choices += adder( "USECASE", "extra_A", getDay, "T", getResult )
268 closingHeader( "USECASE" )
269}
270def wednesday( getDay, getResult ){
271 addingHeader( "FUNC" )
272 FUNC_choices += adder( "FUNC", "basic", getDay, "W", getResult )
273 FUNC_choices += adder( "FUNC", "extra_A", getDay, "W", getResult )
274 closingHeader( "FUNC" )
275 addingHeader( "HA" )
276 HA_choices += adder( "HA", "basic", getDay, "W", getResult )
277 HA_choices += adder( "HA", "extra_A", getDay, "W", getResult )
278 closingHeader( "HA" )
279 addingHeader( "SCPF" )
280 SCPF_choices += adder( "SCPF", "basic", getDay, "W", getResult )
281 SCPF_choices += adder( "SCPF", "extra_A", getDay, "W", getResult )
282 closingHeader( "SCPF" )
283 addingHeader( "SR" )
284 SR_choices += adder( "SR", "basic", getDay, "W", false )
285 closingHeader( "SR" )
286 addingHeader( "USECASE" )
287 closingHeader( "USECASE" )
288}
289def thursday( getDay, getResult ){
290 addingHeader( "FUNC" )
291 FUNC_choices += adder( "FUNC", "basic", getDay, "Th", getResult )
292 FUNC_choices += adder( "FUNC", "extra_B", getDay, "Th", getResult )
293 closingHeader( "FUNC" )
294 addingHeader( "HA" )
295 HA_choices += adder( "HA", "basic", getDay, "Th", getResult )
296 HA_choices += adder( "HA", "extra_B", getDay, "Th", getResult )
297 closingHeader( "HA" )
298 addingHeader( "SCPF" )
299 SCPF_choices += adder( "SCPF", "basic", getDay, "Th", getResult )
300 SCPF_choices += adder( "SCPF", "extra_B", getDay, "Th", getResult )
301 closingHeader( "SCPF" )
302 addingHeader( "SR" )
303 SR_choices += adder( "SR", "basic", getDay, "Th", false )
304 closingHeader( "SR" )
305 addingHeader( "USECASE" )
306 closingHeader( "USECASE" )
307}
308def friday( getDay, getResult ){
309 addingHeader( "FUNC" )
310 FUNC_choices += adder( "FUNC", "basic", getDay, "F", getResult )
311 FUNC_choices += adder( "FUNC", "extra_A", getDay, "F", getResult )
312 closingHeader( "FUNC" )
313 addingHeader( "HA" )
314 HA_choices += adder( "HA", "basic", getDay, "F", getResult )
315 HA_choices += adder( "HA", "extra_A", getDay, "F", getResult )
316 closingHeader( "HA" )
317 addingHeader( "SCPF" )
318 SCPF_choices += adder( "SCPF", "basic", getDay, "F", getResult )
319 SCPF_choices += adder( "SCPF", "extra_A", getDay, "F", getResult )
320 SCPF_choices += adder( "SCPF", "extra_D", getDay, "F", getResult )
321 closingHeader( "SCPF" )
322 addingHeader( "SR" )
323 SR_choices += adder( "SR", "basic", getDay, "F", false )
324 SR_choices += adder( "SR", "extra_A", getDay, "F", false )
325 closingHeader( "SR" )
326 addingHeader( "USECASE" )
327 closingHeader( "USECASE" )
328}
329def saturday( getDay, getResult ){
330 addingHeader( "FUNC" )
331 FUNC_choices += adder( "FUNC", "basic", getDay, "Sa", getResult )
332 FUNC_choices += adder( "FUNC", "extra_A", getDay, "Sa", getResult )
333 FUNC_choices += adder( "FUNC", "extra_B", getDay, "Sa", getResult )
334 closingHeader( "FUNC" )
335 addingHeader( "HA" )
336 HA_choices += adder( "HA", "basic", getDay, "Sa", getResult )
337 HA_choices += adder( "HA", "extra_A", getDay, "Sa", getResult )
338 HA_choices += adder( "HA", "extra_B", getDay, "Sa", getResult )
339 closingHeader( "HA" )
340 addingHeader( "SCPF" )
341 SCPF_choices += adder( "SCPF", "basic", getDay, "Sa", getResult )
342 SCPF_choices += adder( "SCPF", "extra_A", getDay, "Sa", getResult )
343 SCPF_choices += adder( "SCPF", "extra_B", getDay, "Sa", getResult )
344 SCPF_choices += adder( "SCPF", "extra_C", getDay, "Sa", getResult )
345 SCPF_choices += adder( "SCPF", "extra_D", getDay, "Sa", getResult )
346 closingHeader( "SCPF" )
347 addingHeader( "SR" )
348 SR_choices += adder( "SR", "basic", getDay, "Sa", false )
349 SR_choices += adder( "SR", "extra_B", getDay, "Sa", false )
350 closingHeader( "SR" )
351 addingHeader( "USECASE" )
352 USECASE_choices += adder( "USECASE", "basic", getDay, "Sa", getResult )
353 closingHeader( "USECASE" )
354}
355def sunday( getDay, getResult ){
356 addingHeader( "FUNC" )
357 FUNC_choices += adder( "FUNC", "basic", getDay, "S", getResult )
358 FUNC_choices += adder( "FUNC", "extra_A", getDay, "S", getResult )
359 FUNC_choices += adder( "FUNC", "extra_B", getDay, "S", getResult )
360 closingHeader( "FUNC" )
361 addingHeader( "HA" )
362 HA_choices += adder( "HA", "basic", getDay, "S", getResult )
363 HA_choices += adder( "HA", "extra_A", getDay, "S", getResult )
364 HA_choices += adder( "HA", "extra_B", getDay, "S", getResult )
365 closingHeader( "HA" )
366 addingHeader( "SCPF" )
367 SCPF_choices += adder( "SCPF", "basic", getDay, "S", getResult )
368 SCPF_choices += adder( "SCPF", "extra_A", getDay, "S", getResult )
369 SCPF_choices += adder( "SCPF", "extra_B", getDay, "S", getResult )
370 SCPF_choices += adder( "SCPF", "extra_C", getDay, "S", getResult )
371 SCPF_choices += adder( "SCPF", "extra_D", getDay, "S", getResult )
372 closingHeader( "SCPF" )
373 addingHeader( "SR" )
374 SR_choices += adder( "SR", "basic", getDay, "S", false )
375 closingHeader( "SR" )
376 addingHeader( "USECASE" )
377 USECASE_choices += adder( "USECASE", "basic", getDay, "S", getResult )
378 closingHeader( "USECASE" )
379}
Devin Limf5175192018-05-14 19:13:22 -0700380
381// adder that will return the list of the tests.
Devin Lim2edfcec2018-05-09 17:16:21 -0700382def adder( testCat, set, dayAdding, day, getResult ){
Devin Limf5175192018-05-14 19:13:22 -0700383 // testCat : the category of the test which will be either FUNC,HA,SR...
384 // set : the set of the test to be run which will be basic,extra_A,extra_B...
385 // dayAdding : boolean whether to add the days into the list or not
386 // day : the day you are trying to add (m,t,w,th... )
387 // getResult : if want to get the list of the test to be run. False will return empty list.
388 // And once the list is empty, it will not be run.
Devin Lim2edfcec2018-05-09 17:16:21 -0700389 result = ""
390 for( String test in AllTheTests[ testCat ].keySet() ){
391 if( AllTheTests[ testCat ][ test ][ set ] ){
392 if( getResult )
393 result += test + ","
394 if( dayAdding )
395 dayAdder( testCat, test, day )
Devin Limf5175192018-05-14 19:13:22 -0700396 // make HTML columns for wiki page on schedule.
Devin Lim2edfcec2018-05-09 17:16:21 -0700397 makeHtmlColList( testCat, test )
398 }
399 }
400 return result
401}
Devin Limf5175192018-05-14 19:13:22 -0700402
403// Initial part of the wiki page.
Devin Lim2edfcec2018-05-09 17:16:21 -0700404def initHtmlForWiki(){
405 wikiContents = '''
406 <table class="wrapped confluenceTable">
407 <colgroup>
408 <col />
409 <col />
410 <col />
411 <col />
412 <col />
413 <col />
414 </colgroup>
415 <tbody>
416 <tr>
417 <th colspan="1" class="confluenceTh">
418 <br />
419 </th>
420 <th class="confluenceTh"><p>Monday</p></th>
421 <th class="confluenceTh"><p>Tuesday</p></th>
422 <th class="confluenceTh"><p>Wednesday</p></th>
423 <th class="confluenceTh"><p>Thursday</p></th>
424 <th class="confluenceTh"><p>Friday</p></th>
425 <th class="confluenceTh"><p>Saturday</p></th>
426 <th class="confluenceTh"><p>Sunday</p></th>
427 </tr>'''
428 for( String test in testcases.keySet() ){
429 testcases[ test ][ 'wikiContent' ] = '''
430 <tr>
431 <th colspan="1" class="confluenceTh">''' + test + '''</th>'''
432 }
433}
Devin Limf5175192018-05-14 19:13:22 -0700434
435// adding header functionality.
Devin Lim2edfcec2018-05-09 17:16:21 -0700436def addingHeader( testCategory ){
437 testcases[ testCategory ][ 'wikiContent' ] += '''
438 <td class="confluenceTd">
439 <ul>'''
440}
Devin Limf5175192018-05-14 19:13:22 -0700441
442// making column list for html
Devin Lim2edfcec2018-05-09 17:16:21 -0700443def makeHtmlColList( testCategory, testName ){
444 testcases[ testCategory ][ 'wikiContent' ] += '''
445 <li>'''+ testName +'''</li>'''
446
447}
Devin Limf5175192018-05-14 19:13:22 -0700448
449// closing the header for html
Devin Lim2edfcec2018-05-09 17:16:21 -0700450def closingHeader( testCategory ){
451 testcases[ testCategory ][ 'wikiContent' ] += '''
452 </ul>
453 </td>'''
454}
Devin Limf5175192018-05-14 19:13:22 -0700455
456// close the html for the wiki page.
Devin Lim2edfcec2018-05-09 17:16:21 -0700457def closeHtmlForWiki(){
458 for( String test in testcases.keySet() ){
459 wikiContents += testcases[ test ][ 'wikiContent' ]
460 wikiContents += '''
461 </tr>'''
462 }
463 wikiContents += '''
464 </tbody>
465 </table>
466 <p><strong>Everyday</strong>, all SegmentRouting tests are built and run on every supported branch.</p>
467 <p>On <strong>Weekdays</strong>, all the other tests are built and run on the master branch.</p>
468 <p>On <strong>Saturdays</strong>, all the other tests are built and run on the '''+ funcs.branchWithPrefix( previous_version ) +''' branch.</p>
469 <p>On <strong>Sundays</strong>, all the other tests are built and run on the '''+ funcs.branchWithPrefix( before_previous_version ) +''' branch.</p>'''
470}
Devin Limf5175192018-05-14 19:13:22 -0700471
472// post the result to wiki page using publish to confluence.
Devin Lim2edfcec2018-05-09 17:16:21 -0700473def postToWiki( contents ){
474 node( testMachine ){
Devin Limfe9a4cb2018-05-11 17:06:21 -0700475 workspace = fileRelated.jenkinsWorkspace + "all-pipeline-trigger/"
Devin Lim2edfcec2018-05-09 17:16:21 -0700476 filename = "jenkinsSchedule.txt"
477 writeFile file: workspace + filename, text: contents
478 funcs.publishToConfluence( "false", "true",
479 "Automated Test Schedule",
480 workspace + filename )
481 }
482}
Devin Limf5175192018-05-14 19:13:22 -0700483
484// add the day to the "day" on the dictionary.
Devin Lim2edfcec2018-05-09 17:16:21 -0700485def dayAdder( testCat, testName, dayOfWeek ){
486 AllTheTests[ testCat ][ testName ][ "day" ] += dayOfWeek + ","
487}