jenkinsfile: try to use jenkins function for running executables

This commit is contained in:
Nils Andreas Svee committed 2022-11-27 15:15:57 +01:00
1 parent 412b343775
commit 3d9573a50c
1 file changed
+3 -3
Vendored
+3 -3
View File
@@ -26,7 +26,7 @@ pipeline {
environment { environment {
GCC_TARGET = getGCCTarget(TARGET) GCC_TARGET = getGCCTarget(TARGET)
CC = "${GCC_TARGET}-gcc" CC = "${GCC_TARGET}-gcc"
PATH = "${WORKSPACE}/${GCC_TARGET}-cross:${env.HOME}/.cargo/bin:${env.PATH}" PATH = "${WORKSPACE}/${GCC_TARGET}-cross/bin:${env.HOME}/.cargo/bin:${env.PATH}"
TOOLCHAIN_URL = "https://musl.cc/${GCC_TARGET}-cross.tgz" TOOLCHAIN_URL = "https://musl.cc/${GCC_TARGET}-cross.tgz"
} }
@@ -34,9 +34,9 @@ pipeline {
stage('Download GCC toolchain') { stage('Download GCC toolchain') {
when { when {
expression { expression {
def process = "${GCC_TARGET}-gcc".execute() def res = sh(script: "${GCC_TARGET}-gcc", returnStatus: true)
if (process.exitValue() > 0) { if (res > 0) {
return false return false
} else { } else {
return true return true