version_number
This commit is contained in:
parent
9daa8d8592
commit
497d9ac139
|
@ -18,9 +18,9 @@ pipeline {
|
||||||
stage('Building image') {
|
stage('Building image') {
|
||||||
steps{
|
steps{
|
||||||
script {
|
script {
|
||||||
version_info= $(git rev-parse --short HEAD)
|
version_info= sh(script: 'git rev-parse --short HEAD', returnStdout: true)
|
||||||
sh(script: 'echo "${version_info}"')
|
sh(script: 'echo "${version_info}"')
|
||||||
sh(script: 'echo "git rev-parse --short HEAD"')
|
sh(script: 'echo "${GIT_COMMIT}"')
|
||||||
dockerImage = docker.build(imagename, '--build-arg version_info=${version_info} .')
|
dockerImage = docker.build(imagename, '--build-arg version_info=${version_info} .')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue