prepare for additional live builders
Some checks failed
Build empanada images for imagefactory / buildx (push) Failing after 5s
Build empanada container images for lorax / buildx (push) Successful in 2s

This commit is contained in:
Louis Abel 2024-03-27 17:12:15 -07:00
parent 5300649b09
commit 2ced55eab2
Signed by: label
GPG Key ID: 2A6975660E424560
7 changed files with 23 additions and 0 deletions

View File

@ -103,6 +103,7 @@
format: box format: box
variants: [Libvirt, Vbox, VMware] variants: [Libvirt, Vbox, VMware]
livemap: livemap:
builder: "lorax"
git_repo: 'https://git.resf.org/sig_core/kickstarts.git' git_repo: 'https://git.resf.org/sig_core/kickstarts.git'
branch: 'r10' branch: 'r10'
ksentry: ksentry:

View File

@ -103,6 +103,7 @@
format: box format: box
variants: [Libvirt, Vbox, VMware] variants: [Libvirt, Vbox, VMware]
livemap: livemap:
builder: "lorax"
git_repo: 'https://git.resf.org/sig_core/kickstarts.git' git_repo: 'https://git.resf.org/sig_core/kickstarts.git'
branch: 'r10' branch: 'r10'
ksentry: ksentry:

View File

@ -103,6 +103,7 @@
format: box format: box
variants: [Libvirt, Vbox, VMware] variants: [Libvirt, Vbox, VMware]
livemap: livemap:
builder: "lorax"
git_repo: 'https://git.resf.org/sig_core/kickstarts.git' git_repo: 'https://git.resf.org/sig_core/kickstarts.git'
branch: 'r9-beta' branch: 'r9-beta'
ksentry: ksentry:

View File

@ -103,6 +103,7 @@
format: box format: box
variants: [Libvirt, Vbox, VMware] variants: [Libvirt, Vbox, VMware]
livemap: livemap:
builder: "lorax"
git_repo: 'https://git.resf.org/sig_core/kickstarts.git' git_repo: 'https://git.resf.org/sig_core/kickstarts.git'
branch: 'r9' branch: 'r9'
ksentry: ksentry:

View File

@ -103,6 +103,7 @@
format: box format: box
variants: [Libvirt, Vbox, VMware] variants: [Libvirt, Vbox, VMware]
livemap: livemap:
builder: "lorax"
git_repo: 'https://git.resf.org/sig_core/kickstarts.git' git_repo: 'https://git.resf.org/sig_core/kickstarts.git'
branch: 'r9' branch: 'r9'
ksentry: ksentry:

View File

@ -18,6 +18,7 @@ parser.add_argument('--live-iso-mode', type=str, default='local')
parser.add_argument('--hashed', action='store_true') parser.add_argument('--hashed', action='store_true')
parser.add_argument('--just-copy-it', action='store_true', help="Just copy the images to the compose dir") parser.add_argument('--just-copy-it', action='store_true', help="Just copy the images to the compose dir")
parser.add_argument('--force-build', action='store_true', help="Just build and overwrite the images") parser.add_argument('--force-build', action='store_true', help="Just build and overwrite the images")
parser.add_argument('--builder', type=str, help="Choose a builder type and override the set value in the configs")
results = parser.parse_args() results = parser.parse_args()
rlvars = rldict[results.release] rlvars = rldict[results.release]
major = rlvars['major'] major = rlvars['major']
@ -34,6 +35,7 @@ a = LiveBuild(
hashed=results.hashed, hashed=results.hashed,
justcopyit=results.just_copy_it, justcopyit=results.just_copy_it,
force_build=results.force_build, force_build=results.force_build,
builder=results.builder,
logger=results.logger logger=results.logger
) )

View File

@ -1547,6 +1547,7 @@ class LiveBuild:
updated_image: bool = False, updated_image: bool = False,
image_increment: str = '0', image_increment: str = '0',
peridot: bool = False, peridot: bool = False,
builder: str = 'default',
logger=None logger=None
): ):
@ -1576,6 +1577,16 @@ class LiveBuild:
self.hashed = hashed self.hashed = hashed
self.peridot = peridot self.peridot = peridot
# determine builder to use. if a config doesn't have it set, assume
# lorax, the default option.
if rlvars['livemap']['builder']:
self.livebuilder = rlvars['livemap']['builder']
else:
self.livebuilder = "lorax"
if builder == "default":
self.livebuilder = builder
# Relevant major version items # Relevant major version items
self.arch = config['arch'] self.arch = config['arch']
self.arches = rlvars['allowed_arches'] self.arches = rlvars['allowed_arches']
@ -1671,6 +1682,11 @@ class LiveBuild:
self.log.error(Color.FAIL + 'Running an unsupported architecture.') self.log.error(Color.FAIL + 'Running an unsupported architecture.')
raise SystemExit() raise SystemExit()
# Check that the builder is lorax, we don't support anything else yet
if self.livebuilder != "lorax":
self.log.error(Color.FAIL + 'Attempting to use an unsupported builder.')
raise SystemExit()
self._live_iso_build_wrap() self._live_iso_build_wrap()
self.log.info('Compose repo directory: %s' % sync_root) self.log.info('Compose repo directory: %s' % sync_root)