From a3ac6e388a3ef851c91305c760e5b23026d541f5 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Fri, 15 May 2020 10:09:40 +0200 Subject: install_test: reproduce install failure with cache Change-Id: Iaae28a209701f5c5987b27316ad82a3d5f25a4a8 --- rpm-local/install_test.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 rpm-local/install_test.sh (limited to 'rpm-local/install_test.sh') diff --git a/rpm-local/install_test.sh b/rpm-local/install_test.sh new file mode 100755 index 0000000..0aa04ee --- /dev/null +++ b/rpm-local/install_test.sh @@ -0,0 +1,20 @@ +#!/bin/sh -ex +DIR="$(cd "$(dirname "$0")" && pwd -P)" +IMAGE="centos8" + +if ! [ -e ".build.docker.$IMAGE" ]; then + echo "ERROR: run build.sh first, to generate the docker img" + exit 1 +fi + + +docker run \ + -it \ + --rm \ + -v "$DIR/rpmbuild:/home/user/rpmbuild" \ + -v "$DIR/scripts:/scripts" \ + -v "$DIR/cache/$IMAGE/dnf:/var/cache/dnf" \ + -v "$DIR/cache/yum_repos:/root/yum_repos" \ + -v "$DIR/cache/distfiles:/home/user/distfiles" \ + "$IMAGE:latest" \ + /scripts/install_test.sh -- cgit v1.2.3