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

Use vault.centos for centos-7 image repos #3070

Merged
merged 5 commits into from
Jul 2, 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
5 changes: 5 additions & 0 deletions containers/centos/7/Containerfile.upstream
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@

FROM quay.io/centos/centos:7

# Use latest vault repos, mirrors are gone after centos EOL
RUN cd /etc/yum.repos.d/ \
&& sed '/mirrorlist/d' -i *repo \
&& sed 's|#baseurl=http://mirror.centos.org/centos/$releasever|baseurl=https://vault.centos.org/7.9.2009|' -i *repo

# Populate yum cache
RUN yum makecache
2 changes: 1 addition & 1 deletion tests/prepare/install/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ $TEST_IMAGE_PREFIX/fedora/coreos:stable
$TEST_IMAGE_PREFIX/fedora/coreos/ostree:stable}"

# TODO: enable Ubuntu
# TODO: enable centos-7 again with modified repo files)
VIRTUAL_IMAGES="${VIRTUAL_IMAGES:-fedora-rawhide
fedora-39
centos-stream-9
centos-7
fedora-coreos}"

# A couple of "is image this?" helpers, to simplify conditions.
Expand Down
16 changes: 12 additions & 4 deletions tests/prepare/require/test.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
. ../../images.sh || exit 1

PROVISION_HOW=container

rlJournalStart
rlPhaseStartSetup

build_container_image "centos/7/upstream\:latest"
build_container_image "fedora/40:\latest"

rlRun "pushd data"
rlRun "set -o pipefail"
rlPhaseEnd

for image in fedora centos:7 ; do
for image in $TEST_IMAGE_PREFIX/fedora/40:latest \
$TEST_IMAGE_PREFIX/centos/7/upstream:latest; do
# Prepare the tmt command and expected error message
tmt="tmt run -avr provision -h container -i $image"
if [[ $image == fedora ]]; then
error='Unable to find a match: forest'
tmt="tmt run -avr provision -h $PROVISION_HOW -i $image"
if [[ $image =~ fedora ]]; then
error='No match for argument: forest'
else
error='No package forest available'
fi
Expand Down
Loading