commit 719f712d36782671fdda532d1af528bbb3685a55
parent 9a1cdb093e814da2e7afb68bbb251180d1a46f95
Author: Andreas Gruhler <agruhl@gmx.ch>
Date: Sat, 28 Feb 2026 22:00:07 +0100
feat: buildah manifest create
Diffstat:
1 file changed, 34 insertions(+), 0 deletions(-)
diff --git a/src/BuildahManifest.groovy b/src/BuildahManifest.groovy
@@ -0,0 +1,34 @@
+// A class to describe the buildah manifest stage
+class BuildahManifest implements Serializable {
+ private final Script script
+
+ BuildahManifest(Script script) {
+ this.script = script
+ }
+
+ void create(Map imgList = [],
+ String manifestName,
+ String stageName = 'build') {
+
+ def list = imgList.join(' ')
+ def shCmd = sprintf(
+ 'buildah manifest create --amend %s %s',
+ manifestName, list)
+
+ script.stage(stageName) {
+ script.echo "Building manifest ${manifestName}..."
+ script.sh shCmd
+ }
+ }
+
+ void push(String manifestName,
+ String stageName = 'build') {
+
+ def shCmd = sprintf('buildah manifest push %s', manifestName)
+
+ script.stage(stageName) {
+ script.echo "Pushing manifest ${manifestName}..."
+ script.sh shCmd
+ }
+ }
+}