Devin Lim | 90803a8 | 2017-08-29 13:41:44 -0700 | [diff] [blame] | 1 | #!groovy |
Devin Lim | 1cb8751 | 2018-05-10 14:44:18 -0700 | [diff] [blame] | 2 | funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' ) |
| 3 | |
| 4 | def now = funcs.getCurrentTime() |
| 5 | print now.toString() |
| 6 | today = now[ Calendar.DAY_OF_WEEK ] |
| 7 | machines = params.machines |
| 8 | manually_run = params.manual_run |
| 9 | if( !manually_run ){ |
| 10 | slackSend( color:'#03CD9F', |
| 11 | message:":sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles:\n" |
| 12 | + "Starting tests on : " + now.toString() |
| 13 | + "\n:sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles:" ) |
| 14 | } |
| 15 | |
| 16 | machineList = machines.tokenize( "\n;, " ) |
| 17 | machineOn = [:] |
| 18 | |
| 19 | for (machine in machineList){ |
Devin Lim | b91bf79 | 2018-05-10 15:09:52 -0700 | [diff] [blame] | 20 | print( machine ) |
Devin Lim | 1cb8751 | 2018-05-10 14:44:18 -0700 | [diff] [blame] | 21 | machineOn[ machine ] = triggerJob( machine ) |
| 22 | } |
| 23 | |
| 24 | parallel machineOn |
| 25 | |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 26 | |
Devin Lim | 2edfcec | 2018-05-09 17:16:21 -0700 | [diff] [blame] | 27 | def triggerJob( on ){ |
Devin Lim | b91bf79 | 2018-05-10 15:09:52 -0700 | [diff] [blame] | 28 | return{ |
| 29 | jobToRun = on + "-pipeline-trigger" |
| 30 | build job: jobToRun, propagate: false |
| 31 | } |
Devin Lim | 61657e4 | 2017-10-09 17:24:40 -0700 | [diff] [blame] | 32 | } |