From 4237760d57c41a0766ff9e36508d0bfbd6e0be41 Mon Sep 17 00:00:00 2001 From: Nikita Tokarchuk Date: Sun, 26 Dec 2021 00:24:15 +0100 Subject: [PATCH] Fix tools stage dist files cleaning --- .jenkins/Jenkinsfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 3e4b004..320ca97 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -1,4 +1,5 @@ def HELM_DOWNLOAD_URL = "https://get.helm.sh/helm-v3.7.2-linux-amd64.tar.gz" +def WS_DIST = ".dist" def WS_BIN = ".bin" def WS_SCM = ".scm" @@ -29,20 +30,20 @@ pipeline { } stages { - stage("Prepare Tools") { + stage("Download Helm") { when { not { expression { return fileExists("${WS_BIN}/linux-amd64/helm") } } } steps { - dir("${WS_BIN}") { + dir("${WS_DIST}") { sh """ curl -fsSL -O "${HELM_DOWNLOAD_URL}"; - tar xfz *; - rm -f *; - ls -lah ./linux-amd64/helm; + tar xfz -C "${env.WORKSPACE}/${WS_BIN}" *; + ls -lah "${env.WORKSPACE}/${WS_BIN}/linux-amd64/helm"; """ + deleteDir() } } }