diff options
author | Oliver Smith <osmith@sysmocom.de> | 2020-05-27 09:49:26 +0200 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2020-05-27 11:32:22 +0200 |
commit | cabf1d96f2118e397274bda7af0c87b83ac9b710 (patch) | |
tree | dd5b4d09655656e8e63b1afd4409ea19dfa8bc73 /scripts/repo-install-test.sh | |
parent | 449a2443f59709fec2d250b631f15d9c82df6f72 (diff) |
repo-install-test: add KEEP_CACHE env var
Keep downloaded binary packages to make test cycles shorter during
development. While at it, also document all environment variables.
Change-Id: I4d6ebaf460e47f29e023acb0bd78ef52ca80c7cd
Diffstat (limited to 'scripts/repo-install-test.sh')
-rwxr-xr-x | scripts/repo-install-test.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh index 0a19b04..e0367ec 100755 --- a/scripts/repo-install-test.sh +++ b/scripts/repo-install-test.sh @@ -1,4 +1,8 @@ #!/bin/sh -ex +# Environment variables: +# * INTERACTIVE: set to 1 to keep an interactive shell open after the script ran (for debugging) +# * 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" @@ -25,6 +29,13 @@ if [ "$(docker inspect -f '{{.State.Running}}' "$CONTAINER" 2> /dev/null)" = "tr sleep 1 fi +# Additional docker run arguments +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" +fi + # Run the container # * This does not output anything, for debugging add -it and remove &. # * /run, /tmp, cgroups, SYS_ADMIN: needed for systemd @@ -41,6 +52,7 @@ docker run --rm \ -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ --cap-add SYS_ADMIN \ --cap-add SYS_NICE \ + $args \ "$USER/debian-repo-install-test" \ /lib/systemd/systemd & check_if_systemd_is_running |