version_number
This commit is contained in:
parent
ef22a1c300
commit
cb737a466a
|
@ -13,14 +13,14 @@ pipeline {
|
|||
stage('Cloning Git') {
|
||||
steps {
|
||||
git([url: git_url, branch: 'main', credentialsId: '88b54962-1c0e-49cb-8155-22276860f346'])
|
||||
script{
|
||||
version_info= sh(script: 'git rev-parse --short HEAD', returnStdout: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Building image') {
|
||||
steps{
|
||||
script {
|
||||
version_info= sh(script: 'git rev-parse --short HEAD', returnStdout: true)
|
||||
sh(script: 'echo "${version_info}"')
|
||||
sh(script: 'echo "git rev-parse --short HEAD"')
|
||||
dockerImage = docker.build(imagename, '--build-arg version_info=${version_info} .')
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue