Skip to content

Commit

Permalink
Add unpack script to bundle and turn up verbosity on oc mirror during…
Browse files Browse the repository at this point in the history
… unpack to see why it's failing

Signed-off-by: Jared Hocutt <jhocutt@redhat.com>
  • Loading branch information
jaredhocutt committed Sep 15, 2023
1 parent e833234 commit 3b7430d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 5 additions & 1 deletion ocp4_disconnected/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from requests.compat import urljoin
from tqdm import tqdm

from . import MIRROR_URL
from . import BASE_DIR, MIRROR_URL
from .imageset import ImagesetConfig


Expand Down Expand Up @@ -227,9 +227,13 @@ def bundle(self) -> None:
for child in self.clients_dir.iterdir():
if child.is_file():
tar.add(child, arcname=f'{self.clients_dir.stem}/{child.name}')

logger.info('Adding images to tar file')
tar.add(self.images_dir, arcname=self.images_dir.stem)

logger.info('Adding unpack script to tar file')
tar.add(BASE_DIR.joinpath('unpack.sh'), arcname='unpack.sh')

logger.info('Completed bundle')


Expand Down
5 changes: 0 additions & 5 deletions ocp4_disconnected/imageset.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ def append_operator_catalog(self) -> None:
pass

def append_additional_images(self) -> None:
self.imageset_config['mirror']['additionalImages'] = [
# {'name': 'registry.redhat.io/ubi7/ubi:latest'},
# {'name': 'registry.redhat.io/ubi8/ubi:latest'},
# {'name': 'registry.redhat.io/ubi9/ubi:latest'},
]
pass

def create_imageset_config(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion ocp4_disconnected/unpack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ mkdir -p ${METADATA_DIR}
podman login --username openshift --password $(cat ${REGISTRY_DIR}/registry_password) $(hostname --fqdn):8443

cd ${METADATA_DIR}
oc mirror --from=${LATEST_IMAGES_FILE} docker://$(hostname --fqdn):8443
oc mirror --from=${LATEST_IMAGES_FILE} docker://$(hostname --fqdn):8443 --verbose 9

0 comments on commit 3b7430d

Please sign in to comment.