Skip to content

Commit

Permalink
fix(ci): keep Image tag param value from last run
Browse files Browse the repository at this point in the history
Except for `docker-manual` job.

Signed-off-by: Jakub Sokołowski <[email protected]>
  • Loading branch information
jakubgs committed Nov 9, 2023
1 parent 3d217ed commit 712febd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ci/Jenkinsfile.docker
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pipeline {
string(
name: 'IMAGE_TAG',
description: 'Docker image tag.',
defaultValue: getDefaultImageTag()
defaultValue: getDefaultImageTag(params.IMAGE_TAG)
)
string(
name: 'DOCKER_CRED',
Expand Down Expand Up @@ -109,10 +109,11 @@ def discordNotify(Map args=[:]) {
}
}

def getDefaultImageTag() {
def getDefaultImageTag(currentValue) {
switch (env.JOB_BASE_NAME) {
case 'docker-latest': return 'latest'
case 'docker-release': return 'stable'
default: return ''
case 'docker-manual': return ''
default: return currentValue
}
}

0 comments on commit 712febd

Please sign in to comment.