diff --git a/vars/buildContainerImage2.groovy b/vars/buildContainerImage2.groovy index f120027..0d305e3 100644 --- a/vars/buildContainerImage2.groovy +++ b/vars/buildContainerImage2.groovy @@ -53,7 +53,7 @@ def call(args) { sh "buildah manifest create '${full_name}'" archlist.each { arch -> unstash arch - sh "buildah manifest add '${full_name}' oci-archive:\${PWD}/${escapeImageName(name)}-${arch}.tar" + sh "buildah manifest add '${full_name}' oci-archive:\${PWD}/${escapeImageName(name)}-${arch}.tar:${full_name}" } } } @@ -65,6 +65,10 @@ def call(args) { sh "buildah manifest push ${full_name} docker://${repo}:latest" } } else { + archlist.each { arch -> + unstash arch + sh "buildah pull oci-archive:\${PWD}/${escapeImageName(name)}-${arch}.tar:${full_name}" + } sh "buildah push ${full_name} ${full_name}-${env.BUILD_NUMBER}" sh "buildah push ${full_name}" if (env.BRANCH_NAME == 'main') { @@ -89,7 +93,7 @@ def buildStage(args) { container('buildah') { withBuildahCreds(registry) { sh "buildah build -t '${full_name}' ." - sh "buildah push '${full_name}' oci-archive:\${PWD}/${escapeImageName(name)}-${arch}.tar" + sh "buildah push '${full_name}' oci-archive:\${PWD}/${escapeImageName(name)}-${arch}.tar:${full_name}" stash name: arch, includes: "${escapeImageName(name)}-*.tar" } }