Skip to content

Commit

Permalink
buildextend-installer: error out early if missing src config
Browse files Browse the repository at this point in the history
In FCOS, we're looking to drop the installer ISO in favour of the live
images:

coreos/fedora-coreos-tracker#203
coreos/fedora-coreos-config#261

AFAIK, RHCOS should be able to follow suit once the new
coreos-installer binary makes it there.

Until then though, rather than entirely drop support for building it, at
least check upfront that the `installer/` directory exists so we don't
do a bunch of work for nothing.
  • Loading branch information
jlebon committed Jan 9, 2020
1 parent 0c9c1e8 commit c039b36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .cci.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ coreos.pod([image: 'registry.fedoraproject.org/fedora:31', runAsUser: 0, kvm: tr
// sanity check kola actually ran and dumped its output in tmp/
coreos.shwrap("test -d /srv/tmp/kola")
cosa_cmd("buildextend-metal")
cosa_cmd("buildextend-installer")
cosa_cmd("buildextend-live")
cosa_cmd("buildextend-openstack")
cosa_cmd("buildextend-vmware")
cosa_cmd("compress")
Expand Down
12 changes: 8 additions & 4 deletions src/cmd-buildextend-installer
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ else:
image_type = 'installer'
meta_keys = {k: 'live-' + k if is_live else k for k in ('iso', 'kernel', 'initramfs')}

config_src = image_type
if image_type == 'fulliso':
config_src = 'live'
srcdir_prefix = f"src/config/{config_src}/"

if not os.path.isdir(srcdir_prefix):
raise Exception(f"missing directory {srcdir_prefix}")

workdir = os.path.abspath(os.getcwd())
builddir = builds.get_build_dir(args.build)
buildmeta_path = os.path.join(builddir, 'meta.json')
Expand Down Expand Up @@ -222,10 +230,6 @@ def generate_iso():
print(f'Substituting ISO kernel arguments: {kargs}')

# Grab all the contents from the installer dir from the configs
config_src = image_type
if image_type == 'fulliso':
config_src = 'live'
srcdir_prefix = f"src/config/{config_src}/"
for srcdir, dirnames, filenames in os.walk(srcdir_prefix):
dir_suffix = srcdir.replace(srcdir_prefix, '', 1)
dstdir = os.path.join(tmpisoroot, dir_suffix)
Expand Down

0 comments on commit c039b36

Please sign in to comment.