From 53a019eed86a31d7eac9cb2e0251e6d4fec41760 Mon Sep 17 00:00:00 2001 From: thespad Date: Tue, 3 Dec 2024 20:39:18 +0000 Subject: [PATCH] Allow builder override --- roles/generate-jenkins/defaults/main.yml | 1 + roles/generate-jenkins/templates/Jenkinsfile.j2 | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/generate-jenkins/defaults/main.yml b/roles/generate-jenkins/defaults/main.yml index 852ccdd4..b7bb8e81 100644 --- a/roles/generate-jenkins/defaults/main.yml +++ b/roles/generate-jenkins/defaults/main.yml @@ -60,3 +60,4 @@ armhf_native: false build_armhf: false image_provenance: false image_sbom: false +image_builder: 'container' diff --git a/roles/generate-jenkins/templates/Jenkinsfile.j2 b/roles/generate-jenkins/templates/Jenkinsfile.j2 index e4106b61..6ac24618 100644 --- a/roles/generate-jenkins/templates/Jenkinsfile.j2 +++ b/roles/generate-jenkins/templates/Jenkinsfile.j2 @@ -791,7 +791,7 @@ pipeline { --label \"org.opencontainers.image.title={{ project_name|capitalize }}\" \ --label \"org.opencontainers.image.description={% if project_blurb is defined %}{{ project_blurb | replace('"', '') | replace('\n', ' ') }}{% else %}{{ project_name }} image by {{ lsio_project_name }}{% endif %}\" \ --no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \ - --provenance={{ image_provenance | lower }} --sbom={{ image_sbom | lower }} --builder=container --load \ + --provenance={{ image_provenance | lower }} --sbom={{ image_sbom | lower }} --builder={{ image_builder }} --load \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." sh '''#! /bin/bash set -e @@ -859,7 +859,7 @@ pipeline { --label \"org.opencontainers.image.title={{ project_name|capitalize }}\" \ --label \"org.opencontainers.image.description={% if project_blurb is defined %}{{ project_blurb | replace('"', '') | replace('\n', ' ') }}{% else %}{{ project_name }} image by {{ lsio_project_name }}{% endif %}\" \ --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \ - --provenance={{ image_provenance | lower }} --sbom={{ image_sbom | lower }} --builder=container --load \ + --provenance={{ image_provenance | lower }} --sbom={{ image_sbom | lower }} --builder={{ image_builder }} --load \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." sh '''#! /bin/bash set -e @@ -922,7 +922,7 @@ pipeline { --label \"org.opencontainers.image.title={{ project_name|capitalize }}\" \ --label \"org.opencontainers.image.description={% if project_blurb is defined %}{{ project_blurb | replace('"', '') | replace('\n', ' ') }}{% else %}{{ project_name }} image by {{ lsio_project_name }}{% endif %}\" \ --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \ - --provenance={{ image_provenance | lower }} --sbom={{ image_sbom | lower }} --builder=container --load \ + --provenance={{ image_provenance | lower }} --sbom={{ image_sbom | lower }} --builder={{ image_builder }} --load \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." sh '''#! /bin/bash set -e