From 41a21d0a93e5e20938aa5b244a7f75bc9c3f59cf Mon Sep 17 00:00:00 2001 From: andrew clark Date: Tue, 30 Sep 2025 22:28:23 -0600 Subject: [PATCH] Clean code Renamed setup stage to be more descriptive. Added pipeline env variable for consistency. Moved performance test results stage conditional up a level so the parent stage appropriate reports the status if it is skipped. --- Jenkinsfile | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f896b61522..36dedb6cc0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -46,20 +46,6 @@ def runShell(String command){ return (output != "") } -// Return the names of the checks that are required to succeed. -def getRequiredBranchChecks() { - return [ - "Clang Format", - "Run Codegen Tests on gfx90a", - "Build CK and run Tests on gfx942", - "Build CK and run Tests on gfx950", - "Build CK and run Tests on gfx90a", - "Build CK and run Tests on gfx1030", - "Build CK and run Tests on gfx11", - "Build CK and run Tests on gfx1201" - ] -} - def shouldRunCICheck() { // Define patterns for files that should not trigger CI def skipFilePatterns = [ @@ -92,7 +78,7 @@ def shouldRunCICheck() { echo "Changed files: ${changedFiles.join(', ')}" - // Check if any changed files are NOT in the skip patterns. + // Check if any changed files are not in the skip patterns. def hasFilesRequiringCI = changedFiles.any { file -> !skipFilePatterns.any { pattern -> file ==~ pattern @@ -1174,9 +1160,10 @@ pipeline { ck_git_creds = "${ck_git_creds}" gerrit_cred="${gerrit_cred}" DOCKER_BUILDKIT = "1" + SHOULD_RUN_CI = "true" } stages{ - stage("Check for changes") { + stage("Determine CI Execution") { agent{ label rocmnode("nogpu") } steps { script { @@ -1828,19 +1815,13 @@ pipeline { when { beforeAgent true expression { env.SHOULD_RUN_CI.toBoolean() } + expression { (params.RUN_PERFORMANCE_TESTS.toBoolean() || params.BUILD_INSTANCES_ONLY.toBoolean() || params.RUN_CK_TILE_FMHA_TESTS.toBoolean()) && !params.BUILD_LEGACY_OS.toBoolean() } } - parallel - { - stage("Process results"){ - when { - beforeAgent true - expression { (params.RUN_PERFORMANCE_TESTS.toBoolean() || params.BUILD_INSTANCES_ONLY.toBoolean() || params.RUN_CK_TILE_FMHA_TESTS.toBoolean()) && !params.BUILD_LEGACY_OS.toBoolean() } - } - agent { label 'mici' } - steps{ - process_results() - cleanWs() - } + stage("Process results"){ + agent { label 'mici' } + steps{ + process_results() + cleanWs() } } }