Skip to content

Commit 7ccd91c

Browse files
authored
Set appropriate defaults to Jenkins template
1 parent b4524af commit 7ccd91c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/templates/Jenkins/Jenkinsfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ pipeline {
1414
if (osName.startsWith("linux")) { osName = "linux" }
1515
else if (osName.startsWith("mac") || osName.startsWith("osx")) { osName = "macOS" }
1616
else if (osName.startsWith("windows")) { osName = "windows" }
17-
17+
else { osName = "linux" } // Default to linux
18+
1819
def osArch = System.getProperty("os.arch").toLowerCase(Locale.US).replaceAll("[^a-z0-9]+", "")
1920
if (osArch.matches("(x8664|amd64|ia32e|em64t|x64)")) { osArch = "x86_64" }
2021
else if (osArch.matches("(x8632|x86|i[3-6]86|ia32|x32)")) { osArch = "i386" }
2122
else if (osArch.matches("(aarch_64)")) { osArch = "arm64" }
22-
23+
else { osArch = "x86_64" } // Default to x86 64-bit
24+
2325
println("OS detected: " + osName + " and architecture " + osArch)
2426
sh 'curl -LsS https://github.com/debricked/cli/releases/download/release-v2/cli_' + osName + '_' + osArch + '.tar.gz | tar -xz debricked'
2527
sh './debricked scan'

0 commit comments

Comments
 (0)