diff --git a/.papr.yml b/.papr.yml index 095757ab..e4acb6b6 100644 --- a/.papr.yml +++ b/.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 diff --git a/tests/compose b/tests/compose index 39786099..5dfe5469 100755 --- a/tests/compose +++ b/tests/compose @@ -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 diff --git a/tests/composedata/fedora-base.json b/tests/composedata/fedora-base.json index 65f18fa3..f56b4cab 100644 --- a/tests/composedata/fedora-base.json +++ b/tests/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"], diff --git a/tests/composedata/fedora-25.repo b/tests/composedata/fedora.repo similarity index 74% rename from tests/composedata/fedora-25.repo rename to tests/composedata/fedora.repo index 024457a3..d51cc26e 100644 --- a/tests/composedata/fedora-25.repo +++ b/tests/composedata/fedora.repo @@ -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/