Skip to content

Commit

Permalink
test: generate *all* manifests
Browse files Browse the repository at this point in the history
Since we were only testing x86_64 and aarch64, the manifests for ppc64le
and s390x were never being generated in CI.
Adding new jobs, generated by the same configure-generators script, that
just generate these manifests in a new type of child pipeline:
generate-manifests-{distro}-{arch}.
These jobs all run on x86_64, but we separate them per distro-arch so
they can run in parallel.  The goal is to ensure that at least the
manifest generation works for these architectures and the package sets
resolve, even if we don't test that they actually build.
  • Loading branch information
achilleas-k authored and ondrejbudai committed Jan 26, 2024
1 parent 1c42864 commit ba52ac6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/scripts/configure-generators
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import sys
import imgtestlib as testlib

ARCHITECTURES = ["x86_64", "aarch64"]
MANIFEST_ONLY_ARCHES = ["ppc64le", "s390x"]


BASE_CONFIG = """
Expand Down Expand Up @@ -90,6 +91,19 @@ image-build-ostree-trigger-{distro}-{arch}:
"""


MANIFEST_GEN_TEMPLATE = """
generate-manifests-{distro}-{arch}:
stage: gen
extends: .terraform
variables:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches {arch} --distros {distro} --workers 10
"""


def main():
config_path = sys.argv[1]
images = testlib.list_images(arches=ARCHITECTURES)
Expand All @@ -112,13 +126,24 @@ def main():
ostree_gen_stage.append(OSTREE_GEN_TEMPLATE.format(distro=img["distro"], arch=img["arch"], cache=cache))
ostree_trigger_stage.append(OSTREE_TRIGGER_TEMPLATE.format(distro=img["distro"], arch=img["arch"], cache=cache))

man_only_images = testlib.list_images(arches=MANIFEST_ONLY_ARCHES)
man_gen_stage = []
for img in man_only_images:
combo = (img["distro"], img["arch"])
if combo in combos:
continue

combos.add(combo)
man_gen_stage.append(MANIFEST_GEN_TEMPLATE.format(distro=img["distro"], arch=img["arch"]))

with open(config_path, "w", encoding="utf-8") as config_file:
config_file.write(BASE_CONFIG)
config_file.write(testlib.BASE_CONFIG)
config_file.write("\n".join(gen_stage))
config_file.write("\n".join(trigger_stage))
config_file.write("\n".join(ostree_gen_stage))
config_file.write("\n".join(ostree_trigger_stage))
config_file.write("\n".join(man_gen_stage))


if __name__ == "__main__":
Expand Down

0 comments on commit ba52ac6

Please sign in to comment.