Skip to content

Commit 28b3c98

Browse files
Merge pull request #44 from jcapiitao/add_rhel10_repo
COS-3453: get-ocp-repo: pull rhel10 repo
2 parents 1d045b8 + 78e697e commit 28b3c98

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

ci/get-ocp-repo.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ set -euo pipefail
66
# content.
77

88
urls=(
9-
# theoretically that's the only one we need
9+
# theoretically that's the only ones we need
1010
"http://base-4-19-rhel96.ocp.svc.cluster.local"
11+
"http://base-4-20-rhel10.ocp.svc.cluster.local"
1112
# XXX: but also currently add 9.4 repos for crun-wasm when building extensions
1213
# https://github.com/openshift/os/issues/1680
1314
# https://github.com/openshift/os/pull/1682
@@ -16,8 +17,15 @@ urls=(
1617
)
1718

1819
dest=$1; shift
20+
variant=$1; shift
1921

2022
rm -f "$dest"
2123
for url in "${urls[@]}"; do
2224
curl --fail -L "$url" >> "$dest"
2325
done
26+
# One OCP release is tied to only one Y release of RHEL, so the ART team finds there is no value
27+
# specifying a Y stream in PROW. Then we have to add it back here to be consistent with our pipeline.
28+
# https://github.com/openshift/release/blob/master/core-services/release-controller/_repos/ocp-4.20-rhel10.repo
29+
if [[ "$variant" == rhel-10* ]]; then
30+
sed -i "/^name =/s/rhel-10/$variant/;/^\[.*\]$/s/rhel-10/$variant/" "$dest"
31+
fi

ci/prow-entrypoint.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,20 @@ cosa_init() {
5656

5757
# Setup source tree
5858
cosa init --transient --variant "${variant}" "${tmp_src}/os"
59+
60+
# Pull repos from an in-cluster service of the Openshift CI
61+
prepare_repos "${variant}"
5962
}
6063

6164
# Initialize the .repo files
6265
prepare_repos() {
63-
src/config/ci/get-ocp-repo.sh src/config/ocp.repo
66+
if [[ ${#} -ne 1 ]]; then
67+
echo "This should have been called with a single 'variant' argument"
68+
exit 1
69+
fi
70+
local -r variant="${1}"
71+
72+
src/config/ci/get-ocp-repo.sh src/config/ocp.repo "${variant}"
6473
}
6574

6675
# Do a cosa build only.
@@ -69,7 +78,6 @@ prepare_repos() {
6978
# We do not build the QEMU image here as we don't need it in the pure container
7079
# test case.
7180
cosa_build() {
72-
prepare_repos
7381
# Fetch packages
7482
cosa fetch
7583
# Only build the ostree image by default
@@ -236,7 +244,6 @@ main() {
236244
;;
237245
"init")
238246
cosa_init "$2"
239-
prepare_repos
240247
;;
241248
# this is called by cosa's CI
242249
"rhcos-cosa-prow-pr-ci")

manifest-rhel-10.1.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ variables:
1313
include:
1414
- common.yaml
1515

16-
# XXX get rhel 10.1 repos in prow
1716
repos:
1817
- rhel-10.1-baseos
1918
- rhel-10.1-appstream
20-
# Early kernel repo not available for now
21-
# - rhel-10.1-early-kernel
19+
- rhel-10.1-early-kernel
2220

2321
automatic-version-prefix: "10.1.<date:%Y%m%d>"
2422
# This ensures we're semver-compatible which OpenShift wants

0 commit comments

Comments
 (0)