From a5acd93a4b97882ae154695065bfe308e74f1c47 Mon Sep 17 00:00:00 2001 From: Scott Fryer Date: Tue, 3 Oct 2023 11:06:09 +0100 Subject: [PATCH] jfcli --- linux/Jenkinsfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/linux/Jenkinsfile b/linux/Jenkinsfile index fb80b36dd..ce693b779 100644 --- a/linux/Jenkinsfile +++ b/linux/Jenkinsfile @@ -301,14 +301,15 @@ def uploadAlpineArtifacts(String buildArch) { env.TARGET = Target echo "TARGET = ${TARGET}" - def CheckExists = jf 'rt s ${TARGET} --count' + + // Execute the jf command and redirect output to a temporary file + jf "rt s ${TARGET} --count > temp_output.txt" + // Read the file content + def CheckExists = readFile('temp_output.txt').trim() + echo "Check : CheckExists" - if jf 'rt s ${TARGET}' { - echo file_exists=true - } else { - echo file_exists=false - } + } // try {