tests/compose.sh: Always rebuild supermin appliance
We always want the latest rpm-ostree binaries tested, so we need to always rerun supermin. Patch better viewed with whitespace ignored.
This commit is contained in:
parent
317b920667
commit
57edf7e638
@ -47,7 +47,38 @@ if [ ! -d compose-cache ]; then
|
||||
rm -rf manifests/
|
||||
popd # config
|
||||
|
||||
if ! has_compose_privileges; then
|
||||
mkdir cachedir
|
||||
# we just need a repo so we can download stuff (but see note above about
|
||||
# sharing pkgcache repo in the future)
|
||||
ostree init --repo=repo --mode=archive
|
||||
rpm-ostree compose tree --unified-core --download-only-rpms --repo=repo \
|
||||
config/manifest.json --cachedir cachedir \
|
||||
--ex-lockfile config/manifest-lock.x86_64.json \
|
||||
--ex-lockfile config/manifest-lock.overrides.x86_64.yaml
|
||||
rm -rf repo
|
||||
(cd cachedir && createrepo_c .)
|
||||
echo -e "[cache]\nbaseurl=$(pwd)/cachedir\ngpgcheck=0" > config/cache.repo
|
||||
|
||||
pushd config
|
||||
python3 -c '
|
||||
import sys, json
|
||||
y = json.load(sys.stdin)
|
||||
y["repos"] = ["cache"]
|
||||
y["postprocess"] = []
|
||||
y.pop("lockfile-repos", None)
|
||||
json.dump(y, sys.stdout)' < manifest.json > manifest.json.new
|
||||
mv manifest.json{.new,}
|
||||
git add .
|
||||
git -c user.email="composetest@localhost.com" -c user.name="composetest" \
|
||||
commit -am 'modifications for tests'
|
||||
popd # config
|
||||
|
||||
popd # compose-cache
|
||||
fi
|
||||
|
||||
if ! has_compose_privileges; then
|
||||
pushd compose-cache
|
||||
|
||||
# Unlike cosa, we don't need as much flexibility since we don't e.g. build
|
||||
# images. So just create the supermin appliance and root now so each test
|
||||
# doesn't have to build it.
|
||||
@ -107,33 +138,6 @@ EOF
|
||||
chmod a+x init
|
||||
tar -czf supermin.prepare/init.tar.gz --remove-files init
|
||||
supermin --build "${fixtures}/supermin.prepare" --size 5G -f ext2 -o supermin.build
|
||||
fi
|
||||
|
||||
mkdir cachedir
|
||||
# we just need a repo so we can download stuff (but see note above about
|
||||
# sharing pkgcache repo in the future)
|
||||
ostree init --repo=repo --mode=archive
|
||||
rpm-ostree compose tree --unified-core --download-only-rpms --repo=repo \
|
||||
config/manifest.json --cachedir cachedir \
|
||||
--ex-lockfile config/manifest-lock.x86_64.json \
|
||||
--ex-lockfile config/manifest-lock.overrides.x86_64.yaml
|
||||
rm -rf repo
|
||||
(cd cachedir && createrepo_c .)
|
||||
echo -e "[cache]\nbaseurl=$(pwd)/cachedir\ngpgcheck=0" > config/cache.repo
|
||||
|
||||
pushd config
|
||||
python3 -c '
|
||||
import sys, json
|
||||
y = json.load(sys.stdin)
|
||||
y["repos"] = ["cache"]
|
||||
y["postprocess"] = []
|
||||
y.pop("lockfile-repos", None)
|
||||
json.dump(y, sys.stdout)' < manifest.json > manifest.json.new
|
||||
mv manifest.json{.new,}
|
||||
git add .
|
||||
git -c user.email="composetest@localhost.com" -c user.name="composetest" \
|
||||
commit -am 'modifications for tests'
|
||||
popd # config
|
||||
|
||||
popd # compose-cache
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user