Skip to content

Commit

Permalink
Updated the JF as per new jenkins job paramter
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaali09 authored Apr 14, 2021
1 parent 312a71f commit ce4d9ea
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ node('build-slave') {

ansiColor('xterm') {
stage('Checkout') {
cleanWs()
checkout scm
commit_hash = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
artifact_version = sh(script: "echo " + params.github_release_tag.split('/')[-1] + "_" + commit_hash + "_" + env.BUILD_NUMBER, returnStdout: true).trim()
echo "artifact_version: "+ artifact_version
if (!env.hub_org) {
println(ANSI_BOLD + ANSI_RED + "Uh Oh! Please set a Jenkins environment variable named hub_org with value as registery/sunbidrded" + ANSI_NORMAL)
error 'Please resolve the errors and rerun..'
} else
println(ANSI_BOLD + ANSI_GREEN + "Found environment variable named hub_org with value as: " + hub_org + ANSI_NORMAL)
}
cleanWs()
checkout scm
commit_hash = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
build_tag = sh(script: "echo " + params.github_release_tag.split('/')[-1] + "_" + commit_hash + "_" + env.BUILD_NUMBER, returnStdout: true).trim()
echo "build_tag: " + build_tag
}

stage('Build') {
Expand Down

0 comments on commit ce4d9ea

Please sign in to comment.