Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix nightly url #177

Merged
merged 3 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions artbotlib/brew_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import artbotlib.exectools

from . import util
from .constants import RHCOS_BASE_URL
from .constants import NIGHTLY_REGISTRY, QUAY_REGISTRY
from .rhcos import RHCOSBuildInfo

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -143,9 +143,9 @@ def list_component_data_for_release_tag(so, data_type, release_tag):
so.say('Let me look into that. It may take a minute...')

if 'nightly-' in release_tag:
repo_url = 'registry.svc.ci.openshift.org/ocp/release'
repo_url = NIGHTLY_REGISTRY
else:
repo_url = 'quay.io/openshift-release-dev/ocp-release'
repo_url = QUAY_REGISTRY

image_url = f'{repo_url}:{release_tag}-x86_64'

Expand Down
4 changes: 4 additions & 0 deletions artbotlib/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@

PROW_BASE_URL = 'https://prow.ci.openshift.org'

NIGHTLY_REGISTRY = 'registry.ci.openshift.org/ocp/release'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use registry.ci.openshift.org instead, which is referenced in many other places, eg:

  • pyartcd/constant.py:13
  • doozerlib/cli/images_streams.py:596
    and a few moew

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is art-bot repo


QUAY_REGISTRY = 'quay.io/openshift-release-dev/ocp-release'

# Release Controller and RHCOS browser call arches in different ways;
# these two dictionaries easily map names from/to one namespace to the other
RC_ARCH_TO_RHCOS_ARCH = {
Expand Down
4 changes: 2 additions & 2 deletions artbotlib/rhcos.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ async def get_rhcos_build_id_from_release(release_img: str, arch: str) -> str:
logger.info('Retrieving rhcos build ID for %s', release_img)

# Make sure only the release tag is being used
release_img = release_img.replace('registry.ci.openshift.org/ocp/release:', '')
release_img = release_img.replace('quay.io/openshift-release-dev/ocp-release:', '')
release_img = release_img.replace(f"{constants.NIGHTLY_REGISTRY}:", '')
release_img = release_img.replace(f"{constants.QUAY_REGISTRY}:", '')

# Arch shouldn't be in the name
rhcos_arch = constants.RC_ARCH_TO_RHCOS_ARCH[arch]
Expand Down
Loading