Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
steelhead31 committed Jan 16, 2025
1 parent e108520 commit ea20dc3
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions linux_new/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -339,26 +339,25 @@ pipeline {
// error("The Artifacts Are For An Unsupported Architecture")
// }

// Valid architectures
// Valid architectures
def validArchs = ['aarch64', 'x64', 's390x', 'arm', 'ppc64le', 'riscv64']

// Extract architectures from the parameter
def specifiedPaths = params.ARTIFACTS_TO_COPY.tokenize(',') // Split by commas
def extractedArchs = specifiedPaths.collect { path ->
validArchs.find { arch -> path.contains("/${arch}/") }}.unique() // Get unique architectures
validArchs.find { validArch -> path.contains("/${validArch}/") }}.unique() // Get unique architectures

// Validate architectures
if (extractedArchs.size() == 1) {
check_arch = extractedArchs[0]
def check_arch = extractedArchs[0]
println "Valid architecture identified: ${check_arch}"
} else if (extractedArchs.isEmpty()) {
println "WARNING: No valid architecture found in the specified paths: ${params.ARTIFACTS_TO_COPY}"
error("No valid architecture found in the specified paths.")
} else {
println "WARNING: Multiple architectures found: ${extractedArchs}"
error("The Artifacts contain multiple architectures: ${extractedArchs}")
}
} else if (extractedArchs.isEmpty()) {
println "WARNING: No valid architecture found in the specified paths: ${params.ARTIFACTS_TO_COPY}"
error("No valid architecture found in the specified paths.")
} else {
println "WARNING: Multiple architectures found: ${extractedArchs}"
error("The Artifacts contain multiple architectures: ${extractedArchs}")
}

// Derive Node To Build Packages On

Expand Down

0 comments on commit ea20dc3

Please sign in to comment.