Skip to content

Commit

Permalink
Use git hash for package image
Browse files Browse the repository at this point in the history
  • Loading branch information
mscuttari committed Jan 17, 2025
1 parent 2986463 commit 51f394f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .jenkins/package-debian-12.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ node {

stage("Checkout") {
dir(marcoSrcPath) {
checkout(scm)
def scmVars = checkout(scm)
env.GIT_COMMIT = scmVars.GIT_COMMIT
}
}

Expand All @@ -41,7 +42,7 @@ node {
def dockerImage

stage('Docker image') {
dockerImage = docker.build(dockerMARCOImageName + ':latest', dockerArgs)
dockerImage = docker.build(dockerMARCOImageName + ":" + env.GIT_COMMIT[0..6], dockerArgs)
}

dockerImage.inside() {
Expand Down

0 comments on commit 51f394f

Please sign in to comment.