diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 61c9d58529..99b058d7e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,9 +3,6 @@ stages: - init - gen - build - - ostree-gen - - ostree-build - - verify - finish variables: @@ -21,21 +18,6 @@ init: script: - schutzbot/update_github_status.sh start -check-build-coverage: - stage: verify - extends: .terraform - variables: - RUNNER: aws/rhel-9.4-ga-x86_64 - INTERNAL_NETWORK: "true" - PYTHONUNBUFFERED: 1 - script: - - sudo ./test/scripts/install-dependencies - - ./test/scripts/check-build-coverage ./s3configs/ - cache: - key: testcache - paths: - - .cache/osbuild-images - finish: stage: finish dependencies: [] @@ -127,70 +109,6 @@ image-build-trigger-rhel-9.4-x86_64: needs: - generate-build-config-rhel-9.4-x86_64 -generate-ostree-build-config-rhel-9.4-aarch64: - stage: ostree-gen - extends: .terraform - variables: - RUNNER: aws/rhel-9.4-ga-aarch64 - INTERNAL_NETWORK: "true" - script: - - sudo ./test/scripts/setup-osbuild-repo - - sudo ./test/scripts/install-dependencies - - ./test/scripts/generate-ostree-build-config --distro rhel-9.4 --arch aarch64 build-config.yml build-configs - artifacts: - paths: - - build-config.yml - - build-configs - needs: - - image-build-trigger-rhel-9.4-aarch64 - cache: - key: testcache - paths: - - .cache/osbuild-images - - -generate-ostree-build-config-rhel-9.4-x86_64: - stage: ostree-gen - extends: .terraform - variables: - RUNNER: aws/rhel-9.4-ga-x86_64 - INTERNAL_NETWORK: "true" - script: - - sudo ./test/scripts/setup-osbuild-repo - - sudo ./test/scripts/install-dependencies - - ./test/scripts/generate-ostree-build-config --distro rhel-9.4 --arch x86_64 build-config.yml build-configs - artifacts: - paths: - - build-config.yml - - build-configs - needs: - - image-build-trigger-rhel-9.4-x86_64 - cache: - key: testcache - paths: - - .cache/osbuild-images - -image-build-ostree-trigger-rhel-9.4-aarch64: - stage: ostree-build - trigger: - include: - - artifact: build-config.yml - job: generate-ostree-build-config-rhel-9.4-aarch64 - strategy: depend - needs: - - generate-ostree-build-config-rhel-9.4-aarch64 - - -image-build-ostree-trigger-rhel-9.4-x86_64: - stage: ostree-build - trigger: - include: - - artifact: build-config.yml - job: generate-ostree-build-config-rhel-9.4-x86_64 - strategy: depend - needs: - - generate-ostree-build-config-rhel-9.4-x86_64 - generate-manifests-rhel-9.4-ppc64le: stage: gen extends: .terraform @@ -200,7 +118,7 @@ generate-manifests-rhel-9.4-ppc64le: script: - sudo ./test/scripts/setup-osbuild-repo - sudo ./test/scripts/install-dependencies - - go run ./cmd/gen-manifests --arches ppc64le --distros rhel-9.4 --workers 10 --metadata=false --output ./manifests + - go run -tags=exclude_graphdriver_btrfs ./cmd/gen-manifests --arches ppc64le --distros rhel-9.4 --workers 10 --metadata=false --output ./manifests - for manifest in ./manifests/*; do if osbuild --inspect $manifest > output; then echo "$manifest OK"; @@ -219,7 +137,7 @@ generate-manifests-rhel-9.4-s390x: script: - sudo ./test/scripts/setup-osbuild-repo - sudo ./test/scripts/install-dependencies - - go run ./cmd/gen-manifests --arches s390x --distros rhel-9.4 --workers 10 --metadata=false --output ./manifests + - go run -tags=exclude_graphdriver_btrfs ./cmd/gen-manifests --arches s390x --distros rhel-9.4 --workers 10 --metadata=false --output ./manifests - for manifest in ./manifests/*; do if osbuild --inspect $manifest > output; then echo "$manifest OK"; diff --git a/test/scripts/boot-image b/test/scripts/boot-image index 404ffae76f..ea8af978ec 100755 --- a/test/scripts/boot-image +++ b/test/scripts/boot-image @@ -198,18 +198,12 @@ def main(): print(f"Testing image at {image_path}") bib_image_id = "" - match image_type: - case "ami" | "ec2" | "ec2-ha" | "ec2-sap" | "edge-ami": - boot_ami(distro, arch, image_type, image_path, build_config_path) - case "iot-bootable-container": - manifest_id = build_info["manifest-checksum"] - boot_container(distro, arch, image_type, image_path, manifest_id) - bib_ref = testlib.get_bib_ref() - bib_image_id = testlib.skopeo_inspect_id(f"docker://{bib_ref}", testlib.host_container_arch()) - case _: - # skip - print(f"{image_type} boot tests are not supported yet") - return + if image_type in ("ami", "ec2", "ec2-ha", "ec2-sap", "edge-ami"): + boot_ami(distro, arch, image_type, image_path, build_config_path) + else: + # skip + print(f"{image_type} boot tests are not supported yet") + return print("✅ Marking boot successful") # amend build info with boot success diff --git a/test/scripts/build-image b/test/scripts/build-image index ad8994568b..8ca9e73fd1 100755 --- a/test/scripts/build-image +++ b/test/scripts/build-image @@ -26,7 +26,7 @@ def main(): print(json.dumps(config, indent=2)) config_name = config["name"] - testlib.runcmd(["go", "build", "-o", "./bin/build", "./cmd/build"]) + testlib.runcmd(["go", "build", "-tags=exclude_graphdriver_btrfs", "-o", "./bin/build", "./cmd/build"]) cmd = ["sudo", "-E", "./bin/build", "--output", "./build", "--distro", distro, "--image", image_type, "--config", config_path] diff --git a/test/scripts/generate-build-config b/test/scripts/generate-build-config index 4fa01f2871..d8d2b7c2c6 100755 --- a/test/scripts/generate-build-config +++ b/test/scripts/generate-build-config @@ -15,7 +15,6 @@ build/{distro}/{arch}/{image_type}/{config_name}: - sudo ./test/scripts/install-dependencies - ./test/scripts/build-image "{distro}" "{image_type}" "{config}" - ./test/scripts/boot-image "{distro}" "{arch}" "{image_type}" "{image_path}" - - ./test/scripts/upload-results "{distro}" "{image_type}" "{config}" extends: .terraform variables: RUNNER: aws/rhel-9.4-ga-{arch} diff --git a/test/scripts/generate-gitlab-ci b/test/scripts/generate-gitlab-ci index 482ee7c045..056e105806 100755 --- a/test/scripts/generate-gitlab-ci +++ b/test/scripts/generate-gitlab-ci @@ -14,9 +14,6 @@ stages: - init - gen - build - - ostree-gen - - ostree-build - - verify - finish variables: @@ -32,21 +29,6 @@ init: script: - schutzbot/update_github_status.sh start -check-build-coverage: - stage: verify - extends: .terraform - variables: - RUNNER: aws/rhel-9.4-ga-x86_64 - INTERNAL_NETWORK: "true" - PYTHONUNBUFFERED: 1 - script: - - sudo ./test/scripts/install-dependencies - - ./test/scripts/check-build-coverage ./s3configs/ - cache: - key: testcache - paths: - - .cache/osbuild-images - finish: stage: finish dependencies: [] @@ -97,42 +79,6 @@ image-build-trigger-{distro}-{arch}: - generate-build-config-{distro}-{arch} """ -OSTREE_GEN_TEMPLATE = """ -generate-ostree-build-config-{distro}-{arch}: - stage: ostree-gen - extends: .terraform - variables: - RUNNER: aws/rhel-9.4-ga-{arch} - INTERNAL_NETWORK: "true" - script: - - sudo ./test/scripts/setup-osbuild-repo - - sudo ./test/scripts/install-dependencies - - ./test/scripts/generate-ostree-build-config --distro {distro} --arch {arch} build-config.yml build-configs - artifacts: - paths: - - build-config.yml - - build-configs - needs: - - image-build-trigger-{distro}-{arch} - cache: - key: testcache - paths: - - {cache} -""" - -OSTREE_TRIGGER_TEMPLATE = """ -image-build-ostree-trigger-{distro}-{arch}: - stage: ostree-build - trigger: - include: - - artifact: build-config.yml - job: generate-ostree-build-config-{distro}-{arch} - strategy: depend - needs: - - generate-ostree-build-config-{distro}-{arch} -""" - - MANIFEST_GEN_TEMPLATE = """ generate-manifests-{distro}-{arch}: stage: gen @@ -143,7 +89,7 @@ generate-manifests-{distro}-{arch}: script: - sudo ./test/scripts/setup-osbuild-repo - sudo ./test/scripts/install-dependencies - - go run ./cmd/gen-manifests --arches {arch} --distros {distro} --workers 10 --metadata=false --output ./manifests + - go run -tags=exclude_graphdriver_btrfs ./cmd/gen-manifests --arches {arch} --distros {distro} --workers 10 --metadata=false --output ./manifests - for manifest in ./manifests/*; do if osbuild --inspect $manifest > output; then echo "$manifest OK"; @@ -167,8 +113,6 @@ def main(): gen_stage = [] trigger_stage = [] - ostree_gen_stage = [] - ostree_trigger_stage = [] for img in sort_configs(images): combo = (img["distro"], img["arch"]) if combo in combos: @@ -177,8 +121,6 @@ def main(): combos.add(combo) gen_stage.append(GEN_TEMPLATE.format(distro=img["distro"], arch=img["arch"], cache=cache)) trigger_stage.append(TRIGGER_TEMPLATE.format(distro=img["distro"], arch=img["arch"], cache=cache)) - 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 = [] @@ -195,8 +137,6 @@ def main(): 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)) diff --git a/test/scripts/generate-ostree-build-config b/test/scripts/generate-ostree-build-config index 6c66e8ad95..d90c053101 100755 --- a/test/scripts/generate-ostree-build-config +++ b/test/scripts/generate-ostree-build-config @@ -17,7 +17,6 @@ build/{distro}/{arch}/{image_type}/{config_name}: - {start_container} - ./test/scripts/build-image "{distro}" "{image_type}" "{config}" - ./test/scripts/boot-image "{distro}" "{arch}" "{image_type}" "{image_path}" - - ./test/scripts/upload-results "{distro}" "{image_type}" "{config}" extends: .terraform variables: RUNNER: aws/rhel-9.4-ga-{arch} diff --git a/test/scripts/imgtestlib.py b/test/scripts/imgtestlib.py index ad29703963..45d5bb73fe 100644 --- a/test/scripts/imgtestlib.py +++ b/test/scripts/imgtestlib.py @@ -102,7 +102,7 @@ def list_images(distros=None, arches=None, images=None): images_arg = "*" if images: images_arg = ",".join(images) - out, _ = runcmd(["go", "run", "./cmd/list-images", "--json", + out, _ = runcmd(["go", "run", "-tags=exclude_graphdriver_btrfs", "./cmd/list-images", "--json", "--distros", distros_arg, "--arches", arches_arg, "--images", images_arg]) return json.loads(out) @@ -201,7 +201,9 @@ def check_config_names(): def gen_manifests(outputdir, config_map=None, distros=None, arches=None, images=None, commits=False, skip_no_config=False): # pylint: disable=too-many-arguments - cmd = ["go", "run", "./cmd/gen-manifests", + cmd = ["go", "run", + "-tags=exclude_graphdriver_btrfs", + "./cmd/gen-manifests", "--cache", os.path.join(TEST_CACHE_ROOT, "rpmmd"), "--output", outputdir, "--workers", "100"] @@ -316,12 +318,8 @@ def filter_builds(manifests, distro=None, arch=None, skip_ostree_pull=True): os.makedirs(dl_path, exist_ok=True) build_requests = [] - out, dl_ok = dl_build_info(dl_path, distro=distro, arch=arch) - # continue even if the dl failed; will build all configs - if dl_ok: - # print output which includes list of downloaded files for CI job log - print(out) - + # NOTE: disabled cache download for RHEL because there no aws-cli, the build matrix is smaller, and we wont be + # making many PRs to the branch. osbuild_ver = get_osbuild_nevra() errors: list[str] = [] diff --git a/test/scripts/install-dependencies b/test/scripts/install-dependencies index 8d8d0c1473..6a5d8f5da8 100755 --- a/test/scripts/install-dependencies +++ b/test/scripts/install-dependencies @@ -1,8 +1,6 @@ #!/usr/bin/env bash dnf -y install \ - awscli2 \ - btrfs-progs-devel \ device-mapper-devel \ gcc \ go \