Compare commits
1 Commits
main
...
bci2-resou
| Author | SHA1 | Date | |
|---|---|---|---|
| 3d17d1bba4 |
@@ -10,6 +10,7 @@ def call(args) {
|
|||||||
def defaultBranch = args?.defaultBranch
|
def defaultBranch = args?.defaultBranch
|
||||||
def pi = args?.pi
|
def pi = args?.pi
|
||||||
def resources = args?.resources
|
def resources = args?.resources
|
||||||
|
def buildArgs = args?.buildArgs
|
||||||
|
|
||||||
properties([
|
properties([
|
||||||
pipelineTriggers([cron(schedule ?: 'H H H * *')])
|
pipelineTriggers([cron(schedule ?: 'H H H * *')])
|
||||||
@@ -47,6 +48,7 @@ def call(args) {
|
|||||||
registry: registry,
|
registry: registry,
|
||||||
arch: arch,
|
arch: arch,
|
||||||
resources: resources,
|
resources: resources,
|
||||||
|
buildArgs: buildArgs,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,13 +97,18 @@ def buildStage(args) {
|
|||||||
def registry = args.registry
|
def registry = args.registry
|
||||||
def arch = args.arch
|
def arch = args.arch
|
||||||
def resources = args?.resources
|
def resources = args?.resources
|
||||||
|
def buildArgs = args?.buildArgs ?: []
|
||||||
|
|
||||||
|
def build_command = "buildah build -t '${full_name}'"
|
||||||
|
buildArgs.each { build_command += "--build-arg '${it}'" }
|
||||||
|
build_command += ' .'
|
||||||
|
|
||||||
runInPod(arch: arch, resources: resources) {
|
runInPod(arch: arch, resources: resources) {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
||||||
container('buildah') {
|
container('buildah') {
|
||||||
withBuildahCreds(registry) {
|
withBuildahCreds(registry) {
|
||||||
sh "buildah build -t '${full_name}' ."
|
sh build_command
|
||||||
sh "buildah push '${full_name}' oci-archive:\${PWD}/${escapeImageName(name)}-${arch}.tar:${full_name}"
|
sh "buildah push '${full_name}' oci-archive:\${PWD}/${escapeImageName(name)}-${arch}.tar:${full_name}"
|
||||||
stash name: arch, includes: "${escapeImageName(name)}-*.tar"
|
stash name: arch, includes: "${escapeImageName(name)}-*.tar"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user