toolkit/iso/empanadas
Neil Hanlon e60f6524a2
Implement a feature to assist in generating various images
* use a flag to determine if we want an RC or not
* Convert rldict and sigdict to an AttributeDict to allow access via
  __getattr__
* add fedora_release variable to configs for controlling icicle
  templates
* build_image.py script to generate per-architecture XML files used by
  imagefactory
* refactor time to call utcnow() once
* add jinja types to development dependencies until we move past jinja
  2.x
* Generate TDL templates per architecture for each image variant on
  demand
* Generate imagefactory and copy commands to execute image build
* Refactor Kubernetes job template to be generic for all current jobs
2022-06-28 09:33:15 -04:00
..
empanadas Implement a feature to assist in generating various images 2022-06-28 09:33:15 -04:00
images Build a container to run the builds in 2022-06-20 18:01:08 -04:00
tests Lets write some poetry 2022-06-17 15:06:45 -04:00
.gitignore Lets write some poetry 2022-06-17 15:06:45 -04:00
build-container.sh Build a container to run the builds in 2022-06-20 18:01:08 -04:00
Containerfile Ensure builds work properly - architectures must match 2022-06-20 18:03:11 -04:00
poetry.lock update poetry and iso utilities 2022-06-21 17:21:37 -07:00
pyproject.toml Implement a feature to assist in generating various images 2022-06-28 09:33:13 -04:00
README.md Lets write some poetry 2022-06-17 15:06:45 -04:00

iso

Setup / Install

  1. Install Poetry
  2. Setup: poetry install
  3. Have fun

Updating dependencies

Dependencies can be manipulated via the pyproject.toml file or with the poetry add/remove commands.

Changes to the poetry.lock should be commited if dependencies are added or updated.

TODO

Verbose mode should exist to output everything that's being called or ran.

There should be additional logging regardless, not just to stdout, but also to a file.

scripts

  • sync-variant-pungi
  • sync-variant-peridot
  • sync-from-pungi
  • sync-from-peridot
  • sync-sig
  • build-all-iso
  • sign-repos-only

wrappers

  • lorax-generators
  • sync-generators

rules

imports

When making a script, you must import common. This is insanely bad practice, but we would prefer if we started out this way:

from common import *
import argparse

Whatever is imported in common will effectively be imported in your scripts as well, but there is nothing stopping you from defining them again, even out of habit. argparse is there because you better have a very, very good reason to not be writing scripts that are major version specific.

If you are writing something that could be arch specific based on the major version (which is likely), make sure to import the util module and use it arch checker appropriately. Small (but weak) example.

from util import Checks

rlvars = rldict['9']
r = Checks(rlvars, arch)
r.check_valid_arch()

script names and permissions

  • Callable scripts should always end in .py and live in the empanadas/scripts folder
  • Poetry will handle the installation of these executables with setuptools for distribution, and they can be invoked by name using poetry run script-name, too.
    • Configure the script and function to be executed in pyproject.toml (TODO: dynamically load scripts from this directory as well as standardize on the script input/outputs)