Skip to content

Commit

Permalink
ci: drop pushing commit tags for Docker
Browse files Browse the repository at this point in the history
Nobody is using them and we are just cluttering up the repo.

Signed-off-by: Jakub Sokołowski <[email protected]>
  • Loading branch information
jakubgs committed Sep 20, 2023
1 parent fcee527 commit c132ee4
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions ci/Jenkinsfile.docker
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,8 @@ pipeline {
stages {
stage('Build') {
steps { script {
def imageTag = GIT_COMMIT.take(8)
if (env.JOB_BASE_NAME == 'release') {
imageTag = params.GIT_REF
}
image = docker.build(
"${params.IMAGE_NAME}:${imageTag}",
"${params.IMAGE_NAME}:${params.IMAGE_TAG}",
"--build-arg='GIT_COMMIT=${GIT_COMMIT.take(8)}' ."
)
} }
Expand All @@ -51,19 +47,13 @@ pipeline {
stage('Push') {
steps { script {
withDockerRegistry([
credentialsId: params.DOCKER_CRED, url: ""
credentialsId: params.DOCKER_CRED, url: ''
]) {
image.push()
}
} }
}

stage('Deploy') {
steps { script {
withDockerRegistry([
credentialsId: params.DOCKER_CRED, url: ""
]) {
image.push(env.IMAGE_TAG)
/* If Git ref is a tag push it as Docker tag too. */
if (env.GIT_BRANCH ==~ /v\d+\.\d+\.\d+.*/) {
image.push(params.GIT_REF)
}
}
} }
}
Expand Down

0 comments on commit c132ee4

Please sign in to comment.