From 94f5e5f4e6529f94e2ff5ac50d0f6641da09e1d8 Mon Sep 17 00:00:00 2001 From: Micah Abbott Date: Thu, 27 Sep 2018 11:48:18 -0400 Subject: [PATCH] treecompose: properly record sha256sum Using `podman inspect` to get the `Id` of a container locally, is not the same as getting the `Digest` from the registry. This changes the pipeline to use the value of `Digest` from the registry. --- Jenkinsfile.treecompose | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile.treecompose b/Jenkinsfile.treecompose index 5dcf7d6b..ad615627 100644 --- a/Jenkinsfile.treecompose +++ b/Jenkinsfile.treecompose @@ -103,10 +103,10 @@ node(NODE) { stage("Push container") { sh """ podman push ${OSCONTAINER_IMG} - podman inspect --format='{{.Id}}' ${OSCONTAINER_IMG} > imgid.txt + skopeo inspect docker://${OSCONTAINER_IMG} | jq '.Digest' > imgid.txt """ - def cid = readFile('imgid.txt').trim(); - currentBuild.description = "🆕 ${OSCONTAINER_IMG}@sha256:${cid} (${composeMeta.version})"; + def cid = readFile('imgid.txt').trim().replaceAll('"',''); + currentBuild.description = "🆕 ${OSCONTAINER_IMG}@${cid} (${composeMeta.version})"; } stage("rsync out") {