From c6c4b17ef5bfc652a3059739fd7dfcba908ca360 Mon Sep 17 00:00:00 2001 From: Nils Andreas Svee Date: Fri, 9 May 2025 04:48:47 +0700 Subject: [PATCH] fix: let the shell handle the env vars --- Jenkinsfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7c3900c..9059de0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -41,21 +41,20 @@ pipeline { TARGET_ARCH = getArch(GCC_TARGET) CC = "${GCC_TARGET}-gcc" LINKER_ENV_KEY = getLinkerEnv(TARGET) - 'PATH+CC' = "/opt/${GCC_TARGET}-cross/bin:" - 'PATH+RUST' = '/home/sdk/.cargo/bin' + PATH_CC = "/opt/${GCC_TARGET}-cross/bin:/home/sdk/.cargo/bin" RUSTFLAGS = "-C target-feature=+crt-static" } stages { stage('Build') { steps { - sh """ - printenv + sh ''' + export PATH="$PATH_CC:$PATH" cargo +nightly build \ -Z build-std=std,panic_abort \ -Z build-std-features="optimize_for_size" \ - --target ${TARGET} --release - """ + --target $TARGET --release + ''' } }