Fix tools stage dist files cleaning

develop
Nikita Tokarchuk 3 years ago
parent 580f7f15f8
commit 4237760d57
Signed by: mainnika
GPG Key ID: A595FB7E3E56911C
  1. 11
      .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()
}
}
}

Loading…
Cancel
Save