diff options
author | Oliver Smith <osmith@sysmocom.de> | 2020-05-26 17:28:31 +0200 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2020-05-27 14:41:52 +0200 |
commit | 5063473230784b6b0fe7d8322f62ba3d238b8fbb (patch) | |
tree | 7009fb3d3c7a1e1b49454251a04db78e431dd32f /scripts/repo-install-test.sh | |
parent | cabf1d96f2118e397274bda7af0c87b83ac9b710 (diff) |
repo-install-test: support centos
Related: OS#4563
Depends: I50743c304728444ede8e0d40b8abef9d17c44d8d (docker-playground)
Change-Id: I399360ee6389591180859b52f0ef08883447b90b
Diffstat (limited to 'scripts/repo-install-test.sh')
-rwxr-xr-x | scripts/repo-install-test.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh index e0367ec..4bc0fab 100755 --- a/scripts/repo-install-test.sh +++ b/scripts/repo-install-test.sh @@ -4,10 +4,19 @@ # * FEED: binary package feed (e.g. "latest", "nightly") # * KEEP_CACHE: set to 1 to keep downloaded binary packages (for development) . "$(dirname "$0")/common.sh" -docker_images_require "debian-repo-install-test" + +# Show usage +if [ "$#" -ne 1 ]; then + echo "usage: repo-install-test.sh DISTRO" + echo "DISTRO: debian or centos" + exit 1 +fi + +DISTRO="$1" +docker_images_require "$DISTRO-repo-install-test" [ -z "$FEED" ] && FEED="nightly" -CONTAINER="repo-install-test-$FEED" +CONTAINER="$DISTRO-repo-install-test-$FEED" # Try to run "systemctl status" 10 times, kill the container on failure check_if_systemd_is_running() { @@ -34,6 +43,7 @@ args="" if [ -n "$KEEP_CACHE" ]; then args="$args -e KEEP_CACHE=1" args="$args -v $OSMO_CI_DIR/_repo_install_test_cache/debian/apt:/var/cache/apt" + args="$args -v $OSMO_CI_DIR/_repo_install_test_cache/centos/dnf:/var/cache/dnf" fi # Run the container @@ -45,6 +55,7 @@ docker run --rm \ -v "$OSMO_CI_DIR/_repo_install_test_data:/data" \ --name "$CONTAINER" \ -e FEED="$FEED" \ + -e DISTRO="$DISTRO" \ -e container=docker \ --tmpfs /run \ --tmpfs /run/lock \ @@ -53,7 +64,7 @@ docker run --rm \ --cap-add SYS_ADMIN \ --cap-add SYS_NICE \ $args \ - "$USER/debian-repo-install-test" \ + "$USER/$DISTRO-repo-install-test" \ /lib/systemd/systemd & check_if_systemd_is_running |