Skip to content

Commit

Permalink
test: adapt testing to RHEL 9.4
Browse files Browse the repository at this point in the history
- Disable downloading of build cache.
- Disable uploading of results to cache.
- Add build tags to exclude the btrfs graphdriver for the container
  dependencies.
- Remove awscli2 and btrfs-progs-devel from the install dependencies
  script (not available on RHEL).
- Remove the check-build-coverage step in gitlab-ci.  It requires
  reading the build cache.
  • Loading branch information
achilleas-k committed Oct 21, 2024
1 parent cda5a59 commit d2516a3
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 42 deletions.
15 changes: 0 additions & 15 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,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: []
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/build-image
Original file line number Diff line number Diff line change
Expand Up @@ -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, "--type", image_type, "--config", config_path]
Expand Down
1 change: 0 additions & 1 deletion test/scripts/generate-build-config
Original file line number Diff line number Diff line change
Expand Up @@ -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/fedora-40-{arch}
Expand Down
15 changes: 0 additions & 15 deletions test/scripts/generate-gitlab-ci
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,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: []
Expand Down
1 change: 0 additions & 1 deletion test/scripts/generate-ostree-build-config
Original file line number Diff line number Diff line change
Expand Up @@ -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/fedora-40-{arch}
Expand Down
11 changes: 4 additions & 7 deletions test/scripts/imgtestlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -202,6 +202,7 @@ def gen_manifests(outputdir, config_map=None, distros=None, arches=None, images=
commits=False, skip_no_config=False):
# pylint: disable=too-many-arguments
cmd = ["go", "run", "./cmd/gen-manifests",
"-tags=exclude_graphdriver_btrfs",
"--cache", os.path.join(TEST_CACHE_ROOT, "rpmmd"),
"--output", outputdir,
"--workers", "100"]
Expand Down Expand Up @@ -316,12 +317,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] = []
Expand Down
2 changes: 0 additions & 2 deletions test/scripts/install-dependencies
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env bash

dnf -y install \
awscli2 \
btrfs-progs-devel \
device-mapper-devel \
gcc \
go \
Expand Down

0 comments on commit d2516a3

Please sign in to comment.