version_number

This commit is contained in:
ahmed531998 2023-08-30 11:59:53 +02:00
parent 497d9ac139
commit d7c80ebdb4
1 changed files with 1 additions and 4 deletions

5
Jenkinsfile vendored
View File

@ -18,10 +18,7 @@ pipeline {
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_COMMIT}"')
dockerImage = docker.build(imagename, '--build-arg version_info=${version_info} .')
dockerImage = docker.build(imagename, '--build-arg version_info=${GIT_COMMIT} .')
}
}
}