Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
add registry-config check
Browse files Browse the repository at this point in the history
  • Loading branch information
Ximinhan committed Aug 10, 2023
1 parent 1dd3c14 commit 2bbe1a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doozerlib/cli/images_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ def images_streams_mirror(runtime, streams, only_if_missing, live_test_mode, dry
print(f'For {upstream_entry_name}, would have run: {arm_cmd}')
else:
exectools.cmd_assert(arm_cmd, retries=3, realtime=True, timeout=1800)
# mirror builder image streams to priv namespace
if config.upstream_image_mirror is not Missing:
for upstream_image_mirror_dest in config.upstream_image_mirror:
priv_cmd = f'oc image mirror {upstream_dest} {upstream_image_mirror_dest}'
if runtime.registry_config_dir is not None:
priv_cmd += f" --registry-config={get_docker_config_json(runtime.registry_config_dir)}"
if dry_run:
print(f'For {upstream_entry_name}, would have run: {priv_cmd}')
else:
exectools.cmd_assert(priv_cmd, retries=3, realtime=True)


@images_streams.command('check-upstream', short_help='Dumps information about CI buildconfigs/mirrored images associated with this group.')
Expand Down

0 comments on commit 2bbe1a3

Please sign in to comment.