diff --git a/Jenkinsfile.rh.release b/Jenkinsfile.rh.release index c1b0c8e..6995008 100644 --- a/Jenkinsfile.rh.release +++ b/Jenkinsfile.rh.release @@ -34,21 +34,21 @@ node('ubuntu-zion') { env.IQ_SERVER_VERSION = getVersionFromBuildName(env.releaseBuild_NAME) env.IQ_SERVER_CHECKSUM = readBuildArtifact('insight/insight-brain/release', env.releaseBuild_NUMBER, "artifacts/nexus-iq-server-${env.IQ_SERVER_VERSION}-bundle.tar.gz.sha256").trim() env.IQ_RELEASE = env.IQ_SERVER_VERSION.split("-")[0] + env.PF_VERSION = sh( returnStdout: true, script: + "curl -L -H 'Accept: application/vnd.github+json' https://api.github.com/repos/redhat-openshift-ecosystem/openshift-preflight/git/refs/tags | jq -r '.[-1].ref' | cut -d'/' -f 3" + ).trim() deleteDir() checkout scm sh 'docker system prune -a -f' - sh """ - pf_version=`curl -L -H "Accept: application/vnd.github+json" \ - https://api.github.com/repos/redhat-openshift-ecosystem/openshift-preflight/git/refs/tags \ - | jq -r '.[-1].ref' | cut -d'/' -f 3` - echo "Donwloading preflight ${pf_version} ..." + sh ''' + echo "Downloading preflight ${PF_VERSION} ..." wget -q -O preflight \ - https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/${pf_version}/preflight-linux-amd64 + https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/${PF_VERSION}/preflight-linux-amd64 chmod 755 preflight - """ + ''' } stage('Build') { withCredentials([