Skip to content

Commit

Permalink
Always use the latest preflight version available
Browse files Browse the repository at this point in the history
  • Loading branch information
eduard-tita committed Oct 11, 2024
1 parent d96e94c commit 1caab5e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Jenkinsfile.rh.release
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down

0 comments on commit 1caab5e

Please sign in to comment.