Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue_9554 revert code improvments fetch dockerImageDigest #240

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2459,7 +2459,7 @@ 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='{{index .RepoDigests 0}}' ${long_docker_image_name}", returnStdout:true)
dockerImageDigest = context.sh(script: "docker inspect --format='{{.RepoDigests}}' ${long_docker_image_name}", returnStdout:true)

// Use our dockerfile if DOCKER_FILE is defined
if (buildConfig.DOCKER_FILE) {
Expand Down Expand Up @@ -2497,6 +2497,7 @@ class Build {
}
}
} else {
dockerImageDigest = dockerImageDigest.replaceAll("\\[", "").replaceAll("\\]", "")
String dockerRunArg="-e \"BUILDIMAGESHA=$dockerImageDigest\""

// Are we running podman in Docker CLI Emulation mode?
Expand Down