From 46328d0b46cb6e5700c29545f44d5a46a90f824e Mon Sep 17 00:00:00 2001 From: Divya Madala Date: Wed, 12 Jul 2023 12:34:26 -0700 Subject: [PATCH] Add script Signed-off-by: Divya Madala --- vars/patchDockerImage.groovy | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vars/patchDockerImage.groovy b/vars/patchDockerImage.groovy index 79bdec798..d7fed6598 100644 --- a/vars/patchDockerImage.groovy +++ b/vars/patchDockerImage.groovy @@ -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 @@ -45,5 +50,6 @@ void call(Map args = [:]) { fi """ + */ }