Skip to content

Commit

Permalink
Define per-platform ostreecontainer image in the single spot
Browse files Browse the repository at this point in the history
The same place as is used for rpm payload
  • Loading branch information
rvykydal committed Apr 4, 2024
1 parent aa25d11 commit 4a9ba35
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 24 deletions.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion fragments/platform/rhel10/payload/ostreecontainer-bootc.ks

This file was deleted.

1 change: 0 additions & 1 deletion fragments/platform/rhel10/payload/ostreecontainer.ks

This file was deleted.

2 changes: 0 additions & 2 deletions fragments/platform/rhel9/payload/ostreecontainer-bootc.ks

This file was deleted.

1 change: 0 additions & 1 deletion fragments/platform/rhel9/payload/ostreecontainer.ks

This file was deleted.

9 changes: 2 additions & 7 deletions rpm-ostree-container-bootc.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Use the default settings.
%ksappend common/common_no_payload.ks

%ksappend payload/ostreecontainer-bootc.ks
ostreecontainer --no-signature-verification --remote=test-remote --stateroot=test-stateroot --url=@KSTEST_OSTREECONTAINER_URL@

# Reboot the installed system.
reboot
Expand Down Expand Up @@ -36,12 +36,7 @@ fi
bootupctl --help &> /dev/null || echo "bootupctl command not available after booting"
bootc --help &> /dev/null || echo "bootc command not available after booting"

if [[ "@KSTEST_OS_NAME@" == "rhel" ]]; then
expected_url="quay.io/centos-bootc/centos-bootc:stream9"
else
expected_url="quay.io/centos-bootc/fedora-bootc:eln"
fi

expected_url="@KSTEST_OSTREECONTAINER_URL@"
remote_url="$(ostree remote show-url test-remote)"
if [ ${?} -ne 0 ]; then
echo "Couldn't list remote URL for 'test-remote'" >> /root/RESULT
Expand Down
11 changes: 2 additions & 9 deletions rpm-ostree-container.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,13 @@

%ksappend common/common_no_payload.ks

# Set up the RPM OSTree source.
%ksappend payload/ostreecontainer.ks
ostreecontainer --no-signature-verification --transport=registry --url=@KSTEST_OSTREECONTAINER_URL@

%post

if [[ "@KSTEST_OS_NAME@" == "rhel" ]]; then
EXPECTED_URL="quay.io/centos-bootc/centos-bootc:stream9"
else
EXPECTED_URL="quay.io/centos-bootc/fedora-bootc:eln"
fi

# Check the url of the remote.
url="$(ostree remote show-url default)"
if [ "${url}" != "${EXPECTED_URL}" ]; then
if [ "${url}" != "@KSTEST_OSTREECONTAINER_URL@" ]; then
echo "Unexpected URL: ${url}" >> /root/RESULT
fi

Expand Down
1 change: 1 addition & 0 deletions scripts/defaults-rhel10.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ source network-device-names.cfg
export KSTEST_URL='http://download.eng.bos.redhat.com/rhel-10/nightly/RHEL-10-Public-Beta/latest-RHEL-10.0/compose/BaseOS/x86_64/os/'
export KSTEST_MODULAR_URL='http://download.eng.bos.redhat.com/rhel-10/nightly/RHEL-10-Public-Beta/latest-RHEL-10.0/compose/AppStream/x86_64/os/'
export KSTEST_FTP_URL='ftp://ftp.tu-chemnitz.de/pub/linux/fedora/linux/development/rawhide/Everything/$basearch/os/'
export KSTEST_OSTREECONTAINER_URL='quay.io/centos-bootc/centos-bootc:stream10'
1 change: 1 addition & 0 deletions scripts/defaults-rhel9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ source network-device-names.cfg
export KSTEST_URL='http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9.4.0/compose/BaseOS/x86_64/os/'
export KSTEST_MODULAR_URL='http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9.4.0/compose/AppStream/x86_64/os/'
export KSTEST_FTP_URL='ftp://ftp.tu-chemnitz.de/pub/linux/fedora/linux/development/rawhide/Everything/$basearch/os/'
export KSTEST_OSTREECONTAINER_URL='quay.io/centos-bootc/centos-bootc:stream9'
1 change: 1 addition & 0 deletions scripts/defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ export KSTEST_METALINK='https://mirrors.fedoraproject.org/metalink?repo=fedora-$
export KSTEST_MIRRORLIST='https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch'
export KSTEST_MODULAR_URL='http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Modular/$basearch/os/'
export KSTEST_FTP_URL='ftp://ftp.tu-chemnitz.de/pub/linux/fedora/linux/development/rawhide/Everything/$basearch/os/'
export KSTEST_OSTREECONTAINER_URL='quay.io/centos-bootc/fedora-bootc:eln'

0 comments on commit 4a9ba35

Please sign in to comment.