Skip to content

Commit

Permalink
Merge pull request #12 from Kaali09/secor-0.29
Browse files Browse the repository at this point in the history
Updated the JF as per new jenkins job paramter
  • Loading branch information
sowmya-dixit authored Apr 14, 2021
2 parents a0a800c + ce4d9ea commit 8b6172f
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 8b6172f

Please sign in to comment.