compose: use test env fedora.repo file instead
During provisioning, PAPR injects a fedora.repo pointing at a much better & faster mirror than dl.fp.o. Let's use that to make the compose test less flaky. Hoping to make these sorts of optimizations more discoverable in upstream PAPR. Closes: #799 Approved by: cgwalters
This commit is contained in:
parent
51ae1e080e
commit
ac9c3c1635
15
.papr.yml
15
.papr.yml
@ -54,6 +54,9 @@ timeout: 80m
|
||||
|
||||
---
|
||||
|
||||
# NB: when bumping 25 here, also bump fedora.repo, compose script, and
|
||||
# fedora-base.json
|
||||
|
||||
context: compose
|
||||
build: false
|
||||
timeout: 30m
|
||||
@ -64,10 +67,16 @@ timeout: 30m
|
||||
host:
|
||||
distro: fedora/25/atomic
|
||||
|
||||
# copy yum.repos.d to get any injected repos from the host, which
|
||||
# will point to a closer mirror
|
||||
tests:
|
||||
- >
|
||||
docker run --privileged -v $(pwd):/srv/code --rm
|
||||
registry.fedoraproject.org/fedora:25 /bin/sh -c "cd /srv/code && ./ci/build.sh && make install && ./tests/compose"
|
||||
- docker run --privileged --rm
|
||||
-e RPMOSTREE_COMPOSE_TEST_USE_HOST_REPO=1
|
||||
-v /etc/yum.repos.d:/etc/yum.repos.d.host:ro
|
||||
-v $(pwd):/srv/code -w /srv/code
|
||||
registry.fedoraproject.org/fedora:25 /bin/sh -c
|
||||
"cp -fv /etc/yum.repos.d{.host/*.repo,} &&
|
||||
./ci/build.sh && make install && ./tests/compose"
|
||||
|
||||
artifacts:
|
||||
- compose.log
|
||||
|
@ -49,6 +49,17 @@ mkdir -p ${test_compose_datadir}/cache
|
||||
|
||||
echo "Preparing compose tests..." | tee -a ${LOG}
|
||||
|
||||
# take the host repo if it matches our target tree
|
||||
if [ -n "${RPMOSTREE_COMPOSE_TEST_USE_HOST_REPO:-}" ]; then
|
||||
# NB: when bumping 25 here, also bump fedora.repo, .papr.yml, and
|
||||
# fedora-base.json
|
||||
(source /etc/os-release;
|
||||
if [ "$ID" == "fedora" ] && [ "$VERSION_ID" == "25" ]; then
|
||||
echo "Taking stable Fedora repo file from test env."
|
||||
cp -fv /etc/yum.repos.d/fedora.repo ${dn}/composedata
|
||||
fi) &>> ${LOG}
|
||||
fi
|
||||
|
||||
# Delete the default ref, since we want to use subrefs of it
|
||||
(rm ${repobuild}/refs/heads/* -rf
|
||||
rpm-ostree compose --repo=${repobuild} tree --dry-run --cachedir=${test_compose_datadir}/cache ${dn}/composedata/fedora-base.json
|
||||
|
@ -1,7 +1,9 @@
|
||||
{
|
||||
"COMMENT": "when bumping 25 here, also bump fedora.repo, compose script, and .papr.yml",
|
||||
|
||||
"ref": "fedora/25/${basearch}",
|
||||
|
||||
"repos": ["fedora-25"],
|
||||
"repos": ["fedora"],
|
||||
|
||||
"packages": ["kernel", "nss-altfiles", "systemd", "ostree", "selinux-policy-targeted"],
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
[fedora-25]
|
||||
[fedora]
|
||||
#when bumping 25 here, also bump fedora-base.json, compose script, and .papr.yml
|
||||
name=Fedora 25 (devel) - $basearch
|
||||
failovermethod=priority
|
||||
baseurl=https://dl.fedoraproject.org/pub/fedora/linux/releases/25/Everything/$basearch/os/
|
Loading…
Reference in New Issue
Block a user