Skip to content

Commit

Permalink
Move dockerRegistry patch into with dockerRegistry section
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leonard <[email protected]>
  • Loading branch information
andrew-m-leonard committed Jul 23, 2024
1 parent b3f2f18 commit 25a924e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2056,6 +2056,8 @@ class Build {
context.docker.image(buildConfig.DOCKER_IMAGE).pull()
}
}
def long_docker_image_name = context.sh(script: "docker image ls | grep ${buildConfig.DOCKER_IMAGE} | head -n1 | awk '{print \$1}'", returnStdout:true).trim()
context.sh(script: "docker tag '${long_docker_image_name}' '${buildConfig.DOCKER_IMAGE}'", returnStdout:false)
} else {
if (buildConfig.DOCKER_ARGS) {
context.sh(script: "docker pull ${buildConfig.DOCKER_IMAGE} ${buildConfig.DOCKER_ARGS}")
Expand All @@ -2069,8 +2071,6 @@ class Build {
}
}
// Store the pulled docker image digest as 'buildinfo'
def long_docker_image_name = context.sh(script: "docker image ls | grep ${buildConfig.DOCKER_IMAGE} | head -n1 | awk '{print \$1}'", returnStdout:true).trim()
context.sh(script: "docker tag '${long_docker_image_name}' '${buildConfig.DOCKER_IMAGE}'", returnStdout:false)
dockerImageDigest = context.sh(script: "docker inspect --format='{{.RepoDigests}}' ${buildConfig.DOCKER_IMAGE}", returnStdout:true)

// Use our dockerfile if DOCKER_FILE is defined
Expand Down

0 comments on commit 25a924e

Please sign in to comment.