Skip to content
Closed
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
9 changes: 6 additions & 3 deletions build-node-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ if [ "${OPENSHIFT_CI}" != 0 ]; then
/run/src/ci/get-ocp-repo.sh /etc/yum.repos.d/ocp.repo
fi

# add all the repos from the src repo into `/etc/yum.repos.d` so dnf sees them
cat /run/src/*.repo >> /etc/yum.repos.d/git.repo

source /etc/os-release

# add CentOS repos from the source - only needed for CentOS/SCOS builds.
# For RHEL builds, ART injects the correct repos via art-unsigned.repo.
if [ $ID = centos ]; then
cat /run/src/*.repo >> /etc/yum.repos.d/git.repo
fi

# XXX: For SCOS, only allow certain packages to come from ART; everything else
# should come from CentOS. We should eventually sever this.
if [ $ID = centos ]; then
Expand Down
23 changes: 5 additions & 18 deletions packages-openshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ metadata:
# This should match the /etc/os-release manipulation we do below when
# injecting `OPENSHIFT_VERSION`. It's used by CI to determine the repos to
# inject when building the layered image.
ocp_version: "4.22"
ocp_version: "4.23"

conditional-include:
- if:
Expand All @@ -12,22 +12,9 @@ conditional-include:
- osversion != "centos-10"
include:
repos: [ENOEXIST] # We want an error in this case
- if: osversion == "rhel-9.8"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How do you inject the repos? Don't we still need them here for the CI or local builds?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

For Konflux, we inject them in the Dockerfile we produce by reconciling the upstream one, here.

For CI builds, things get more complicated. For "normal" images, we use well-known CI images that we produce and publish to floating tags like registry.ci.openshift.org/ocp/4.22:base-rhel9. These images have a dnf wrapper script we use to inject the needed repos at build time. Do you need CI builds at all in this case? We would be mirroring the result of our Konflux builds to any imagestream you'd need.

include:
repos:
- rhel-9.8-baseos
- rhel-9.8-appstream
- rhel-9.8-early-kernel
- rhel-9.8-fast-datapath
- rhel-9.8-server-ose-4.22
- if: osversion == "rhel-10.2"
include:
repos:
- rhel-10.2-baseos
- rhel-10.2-appstream
- rhel-10.2-early-kernel
- rhel-10.2-fast-datapath
- rhel-10.2-server-ose-4.22
# rhel-9.8 and rhel-10.2: no explicit repo includes needed.
# ART injects art-unsigned.repo with the correct arch-specific repos.
# build-node-image.sh ensures CentOS repos are not added for RHEL builds.
- if: osversion == "centos-9"
include:
repos:
Expand Down Expand Up @@ -120,7 +107,7 @@ postprocess:
#!/usr/bin/env bash
set -xeuo pipefail
cat >> /usr/lib/os-release <<EOF
OPENSHIFT_VERSION="4.22"
OPENSHIFT_VERSION="4.23"
EOF

- |
Expand Down