Skip to content

Commit

Permalink
Add script
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 12, 2023
1 parent 323e74f commit 46328d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions vars/patchDockerImage.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,22 @@ void call(Map args = [:]) {
docker pull ${docker_image}
"""

sh """docker inspect --format '{{ index .Config.Labels "org.label-schema.build-date"}}' ${docker_image} > time"""

build_time = readFile('time').trim()

sh """docker inspect --format '{{ index .Config.Labels "org.label-schema.description"}}' ${docker_image} > number"""

build_number = readFile('number').trim()
println("${number} ${time}")

println("${build_number}")

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

println("staging_image: ${staging_image}")

/*Validate Digests*/
/*Validate Digests
sh"""
#!/bin/bash
Expand All @@ -45,5 +50,6 @@ void call(Map args = [:]) {
fi
"""
*/

}

0 comments on commit 46328d0

Please sign in to comment.