Skip to content

Commit

Permalink
Add changes
Browse files Browse the repository at this point in the history
Signed-off-by: Divya Madala <divyaasm@amazon.com>
  • Loading branch information
Divyaasm committed Jul 10, 2023
1 parent 9c41995 commit 8d77fc9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions vars/patchDockerImage.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,26 @@ void call(Map args = [:]) {
sh"""
#!/bin/bash
docker pull ${docker_image}
build_time=`docker inspect --format '{{ index .Config.Labels "org.label-schema.build-date"}}' ${docker_image}`
build_number=`docker inspect --format '{{ index .Config.Labels "org.label-schema.description"}}' ${docker_image}`
$build_time=`docker inspect --format '{{ index .Config.Labels "org.label-schema.build-date"}}' ${docker_image}`
$build_number=`docker inspect --format '{{ index .Config.Labels "org.label-schema.description"}}' ${docker_image}`
"""
println("docker image successfully pulled and inspected, exit 1 ${build_time} ${build_number}")

staging_image += "${build_number}"
staging_image = ${staging_image} + "${build_number}"

println("staging_image ${staging_image}")
println("staging_image: ${staging_image}")

/* Validate Digests */
sh"""
#!/bin/bash
prod_digest=`docker inspect ${docker_image} | jq -r '.[0].RepoDigests[0]' | cut -d'@' -f2`
staging_digest=`docker inspect ${staging_image} | jq -r '.[0].RepoDigests[0]' | cut -d'@' -f2`
prod_digest=`docker inspect --format='{{.RepoDigests}}' opensearchproject/${docker_image}`
staging_digest=`docker inspect --format='{{.RepoDigests}}' opensearchproject/${docker_image}`
"""
println("prod_digest staging_digest")
println("${prod_digest[0]} ${staging_digest[0]}")



Expand Down

0 comments on commit 8d77fc9

Please sign in to comment.