Skip to content

Commit 3ee3fca

Browse files
committed
Ensure we scan OCI artifact directories after unpacking nested archives
Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
1 parent e812bf7 commit 3ee3fca

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/gardenlinux/oci/container.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -445,16 +445,15 @@ def push_manifest_and_artifacts_from_directory(
445445
if not isinstance(manifest, Manifest):
446446
raise RuntimeError("Artifacts image manifest given is invalid")
447447

448+
# Scan and extract nested artifacts
449+
for file_path_name in artifacts_dir.glob("*.pxe.tar.gz"):
450+
self._logger.info(f"Found nested artifact {file_path_name}")
451+
extract_targz(file_path_name, artifacts_dir)
452+
448453
files = [
449454
file_name for file_name in artifacts_dir.iterdir() if file_name.is_file()
450455
]
451456

452-
# Scan and extract nested artifacts
453-
for file_path_name in files:
454-
if file_path_name.match("*.pxe.tar.gz"):
455-
self._logger.info(f"Found nested artifact {file_path_name}")
456-
extract_targz(file_path_name, artifacts_dir)
457-
458457
artifacts_with_metadata = Container.get_artifacts_metadata_from_files(
459458
files, manifest.arch
460459
)

0 commit comments

Comments
 (0)