Revert "ci: use GIT_REF for building docker image when set (#1218)"

This reverts commit 1a96cd2271.
This commit is contained in:
Siddarth Kumar 2024-09-11 12:53:26 +05:30
parent 1a96cd2271
commit 2b61569558
No known key found for this signature in database
GPG Key ID: 599D10112BF518DB
1 changed files with 2 additions and 3 deletions

View File

@ -43,10 +43,9 @@ pipeline {
stages {
stage('Build') {
steps { script {
def commitOrRef = params.GIT_REF ? params.GIT_REF.take(8) : GIT_COMMIT.take(8)
image = docker.build(
"${params.IMAGE_NAME}:${params.IMAGE_TAG ?: commitOrRef}",
"--build-arg='GIT_COMMIT=${commitOrRef}' ."
"${params.IMAGE_NAME}:${params.IMAGE_TAG ?: GIT_COMMIT.take(8)}",
"--build-arg='GIT_COMMIT=${GIT_COMMIT.take(8)}' ."
)
} }
}