From ab679c8d9f974ec5b8c6bba52e623557def958c7 Mon Sep 17 00:00:00 2001 From: amd-garydeng Date: Tue, 17 Dec 2024 13:20:23 -0700 Subject: [PATCH 1/2] Use jenkins XML details for node config instead of hardcoded --- .jenkins/precheckin.groovy | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.jenkins/precheckin.groovy b/.jenkins/precheckin.groovy index 074bc536..82c7b04d 100644 --- a/.jenkins/precheckin.groovy +++ b/.jenkins/precheckin.groovy @@ -50,35 +50,27 @@ def runCI = ci: { String urlJobName = auxiliary.getTopJobName(env.BUILD_URL) - def propertyList = ["compute-rocm-dkms-no-npi-hipclang":[pipelineTriggers([cron('0 1 * * 0')])]] + def propertyList = ["compute-rocm-dkms-no-npi-hipclang":[pipelineTriggers([cron('0 1 * * 0')])], + "rocm-docker":[]] propertyList = auxiliary.appendPropertyList(propertyList) - def jobNameList = ["compute-rocm-dkms-no-npi-hipclang":([ubuntu18:['gfx900'],centos7:['gfx906'],centos8:['gfx906'],sles15sp1:['gfx908']])] + def jobNameList = ["compute-rocm-dkms-no-npi-hipclang":[]] jobNameList = auxiliary.appendJobNameList(jobNameList) - auxiliary.registerDependencyBranchParameter(["rocPRIM"]) - - propertyList.each + propertyList.each { jobName, property-> if (urlJobName == jobName) properties(auxiliary.addCommonProperties(property)) } - Set seenJobNames = [] - jobNameList.each + jobNameList.each { jobName, nodeDetails-> - seenJobNames.add(jobName) if (urlJobName == jobName) - runCI(nodeDetails, jobName) - } - - // For url job names that are outside of the standardJobNameSet i.e. compute-rocm-dkms-no-npi-1901 - if(!seenJobNames.contains(urlJobName)) - { - properties(auxiliary.addCommonProperties([pipelineTriggers([cron('0 1 * * *')])])) - runCI([ubuntu16:['gfx906']], urlJobName) + stage(jobName) { + runCI(nodeDetails, jobName) + } } } From a951387857e992bc6a04d3859be05cc43cdbd154 Mon Sep 17 00:00:00 2001 From: amd-garydeng Date: Tue, 17 Dec 2024 13:26:11 -0700 Subject: [PATCH 2/2] revert precheckin.groovy and put changes in staticanalysis.groovy --- .jenkins/precheckin.groovy | 24 ++++++++++++++++-------- .jenkins/staticanalysis.groovy | 24 +++++++++++++++++++++--- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/.jenkins/precheckin.groovy b/.jenkins/precheckin.groovy index 82c7b04d..074bc536 100644 --- a/.jenkins/precheckin.groovy +++ b/.jenkins/precheckin.groovy @@ -50,27 +50,35 @@ def runCI = ci: { String urlJobName = auxiliary.getTopJobName(env.BUILD_URL) - def propertyList = ["compute-rocm-dkms-no-npi-hipclang":[pipelineTriggers([cron('0 1 * * 0')])], - "rocm-docker":[]] + def propertyList = ["compute-rocm-dkms-no-npi-hipclang":[pipelineTriggers([cron('0 1 * * 0')])]] propertyList = auxiliary.appendPropertyList(propertyList) - def jobNameList = ["compute-rocm-dkms-no-npi-hipclang":[]] + def jobNameList = ["compute-rocm-dkms-no-npi-hipclang":([ubuntu18:['gfx900'],centos7:['gfx906'],centos8:['gfx906'],sles15sp1:['gfx908']])] jobNameList = auxiliary.appendJobNameList(jobNameList) - propertyList.each + auxiliary.registerDependencyBranchParameter(["rocPRIM"]) + + propertyList.each { jobName, property-> if (urlJobName == jobName) properties(auxiliary.addCommonProperties(property)) } - jobNameList.each + Set seenJobNames = [] + jobNameList.each { jobName, nodeDetails-> + seenJobNames.add(jobName) if (urlJobName == jobName) - stage(jobName) { - runCI(nodeDetails, jobName) - } + runCI(nodeDetails, jobName) + } + + // For url job names that are outside of the standardJobNameSet i.e. compute-rocm-dkms-no-npi-1901 + if(!seenJobNames.contains(urlJobName)) + { + properties(auxiliary.addCommonProperties([pipelineTriggers([cron('0 1 * * *')])])) + runCI([ubuntu16:['gfx906']], urlJobName) } } diff --git a/.jenkins/staticanalysis.groovy b/.jenkins/staticanalysis.groovy index 5c0b9490..4e2237ab 100644 --- a/.jenkins/staticanalysis.groovy +++ b/.jenkins/staticanalysis.groovy @@ -39,8 +39,26 @@ def runCI = ci: { String urlJobName = auxiliary.getTopJobName(env.BUILD_URL) - properties(auxiliary.addCommonProperties([pipelineTriggers([cron('0 1 * * 6')])])) - stage(urlJobName) { - runCI([ubuntu20:['any']], urlJobName) + def propertyList = ["compute-rocm-dkms-no-npi-hipclang":[pipelineTriggers([cron('0 1 * * 0')])], + "rocm-docker":[]] + propertyList = auxiliary.appendPropertyList(propertyList) + + def jobNameList = ["compute-rocm-dkms-no-npi-hipclang":[]] + jobNameList = auxiliary.appendJobNameList(jobNameList) + + propertyList.each + { + jobName, property-> + if (urlJobName == jobName) + properties(auxiliary.addCommonProperties(property)) + } + + jobNameList.each + { + jobName, nodeDetails-> + if (urlJobName == jobName) + stage(jobName) { + runCI(nodeDetails, jobName) + } } }