Skip to content

Commit

Permalink
Merge pull request #177 from Ximinhan/fix-url
Browse files Browse the repository at this point in the history
fix nightly url
  • Loading branch information
Ximinhan authored Apr 9, 2024
2 parents 3dc9ba1 + 5389445 commit 13ecc17
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
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'

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

0 comments on commit 13ecc17

Please sign in to comment.