commit 927b82ce00bb6e0b2a2d3b35a64d207f379b0cc6
parent da293e1fde83dc443c7c9ee9bf41523af8c5490a
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date: Wed, 5 Jun 2024 00:50:13 +0200
feat(buildah): add buildah pipeline
Diffstat:
1 file changed, 31 insertions(+), 0 deletions(-)
diff --git a/vars/buildah.groovy b/vars/buildah.groovy
@@ -0,0 +1,31 @@
+def call(String imgContext,
+ String imgName,
+ String imgArch = 'arm64/v8',
+ String imgTag = 'latest',
+ String imgRegistry = 'host.docker.internal:5000') {
+
+ def shCmd = sprintf(
+ 'buildah bud --no-cache --arch=%s -t %s/%s:%s %s',
+ imgArch, imgRegistry, imgName, imgTag, imgContext)
+
+ pipeline {
+ agent {
+ label 'nomad'
+ }
+
+ stages {
+ stage('build') {
+ steps {
+ sh shCmd
+ }
+ }
+ //stage('publish') {
+ // steps {
+ // script {
+ // sh 'buildah push -t ${imgRegistry}/${imgName}:${imgTag}'
+ // }
+ // }
+ //}
+ }
+ }
+}