@@ -266,8 +266,15 @@ class Constants {
266266// those are required, don't add them (which simplifies the view pages, as well).
267267// **************************************************************
268268
269+ class Views {
270+ def static MergeJobView = null
271+ def static PeriodicJobView = null
272+ def static ArchitectureViews = [:]
273+ def static OSViews = [:]
274+ }
275+
269276// MergeJobView: include all jobs that execute when a PR change is merged.
270- def static MergeJobView = listView(' Merge' ) {
277+ Views. MergeJobView = listView(' Merge' ) {
271278 columns {
272279 status()
273280 weather()
@@ -280,7 +287,7 @@ def static MergeJobView = listView('Merge') {
280287}
281288
282289// PeriodicJobView: include all jobs that execute on a schedule
283- def static PeriodicJobView = listView(' Periodic' ) {
290+ Views. PeriodicJobView = listView(' Periodic' ) {
284291 columns {
285292 status()
286293 weather()
@@ -293,9 +300,8 @@ def static PeriodicJobView = listView('Periodic') {
293300}
294301
295302// Create a view for non-PR jobs for each architecture.
296- def static ArchitectureViews = [:]
297303Constants . architectureList. each { architecture ->
298- ArchitectureViews [architecture] = listView(architecture) {
304+ Views. ArchitectureViews [architecture] = listView(architecture) {
299305 columns {
300306 status()
301307 weather()
@@ -309,13 +315,12 @@ Constants.architectureList.each { architecture ->
309315}
310316
311317// Create a view for non-PR jobs for each OS.
312- def static OSViews = [:]
313318Constants . osList. each { os ->
314319 // Don't create one for the special 'Windows_NT_BuildOnly'
315320 if (os == ' Windows_NT_BuildOnly' ) {
316321 return
317322 }
318- OSViews [os] = listView(os) {
323+ Views. OSViews [os] = listView(os) {
319324 columns {
320325 status()
321326 weather()
@@ -329,15 +334,15 @@ Constants.osList.each { os ->
329334}
330335
331336def static addToMergeView (def job ) {
332- MergeJobView . with {
337+ Views. MergeJobView. with {
333338 jobs {
334339 name(job. name)
335340 }
336341 }
337342}
338343
339344def static addToPeriodicView (def job ) {
340- PeriodicJobView . with {
345+ Views. PeriodicJobView. with {
341346 jobs {
342347 name(job. name)
343348 }
@@ -351,14 +356,14 @@ def static addToViews(def job, def isPR, def architecture, def os) {
351356 }
352357
353358 // Add to architecture view.
354- ArchitectureViews [architecture]. with {
359+ Views. ArchitectureViews [architecture]. with {
355360 jobs {
356361 name(job. name)
357362 }
358363 }
359364
360365 // Add to OS view.
361- OSViews [os]. with {
366+ Views. OSViews [os]. with {
362367 jobs {
363368 name(job. name)
364369 }
0 commit comments