aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2020-05-27 13:22:07 +0200
committerOliver Smith <osmith@sysmocom.de>2020-05-27 14:42:05 +0200
commit84929129bb1cc6c9468381806a3454185cee9d59 (patch)
tree8ec694fc7b4f9671b6652d0a6152347dc57237cc
parent5063473230784b6b0fe7d8322f62ba3d238b8fbb (diff)
repo-install-test: don't mount /data
The "run-inside-docker.sh" script is running as root (in order to be able to install packages). Do not mount an outside directory as /data inside the image anymore, where the script would write temporary data. This causes problems on jenkins, as the temporary files are written as root and jenkins is then unable to wipe the workspace. I had used this for debugging when I wrote the script initially, but almost the same can be done now with INTERACTIVE=1 and cat on the temporary files. Related: OS#4563 Change-Id: If7e1d83580c2951e7e50181ba7e755b987675e4b
-rwxr-xr-xscripts/repo-install-test.sh1
-rwxr-xr-xscripts/repo-install-test/run-inside-docker.sh18
2 files changed, 9 insertions, 10 deletions
diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh
index 4bc0fab..ac8242d 100755
--- a/scripts/repo-install-test.sh
+++ b/scripts/repo-install-test.sh
@@ -52,7 +52,6 @@ fi
# * SYS_NICE: needed for changing CPUScheduling{Policy,Priority} (osmo-bts systemd service files)
docker run --rm \
-v "$OSMO_CI_DIR/scripts/repo-install-test:/repo-install-test:ro" \
- -v "$OSMO_CI_DIR/_repo_install_test_data:/data" \
--name "$CONTAINER" \
-e FEED="$FEED" \
-e DISTRO="$DISTRO" \
diff --git a/scripts/repo-install-test/run-inside-docker.sh b/scripts/repo-install-test/run-inside-docker.sh
index a6eda13..e0f07c2 100755
--- a/scripts/repo-install-test/run-inside-docker.sh
+++ b/scripts/repo-install-test/run-inside-docker.sh
@@ -94,15 +94,15 @@ configure_keep_cache_centos() {
echo "keepcache=1" >> /etc/dnf/dnf.conf
}
-# Filter /data/osmocom_packages_all.txt through a blacklist_$DISTRO.txt and store the result in
-# /data/osmocom_packages.txt.
+# Filter $PWD/osmocom_packages_all.txt through a blacklist_$DISTRO.txt and store the result in
+# $PWD/osmocom_packages.txt.
filter_packages_txt() {
# Copy distro specific blacklist file, remove comments and sort it
- grep -v "^#" /repo-install-test/blacklist_$DISTRO.txt | sort -u > /data/blacklist.txt
+ grep -v "^#" /repo-install-test/blacklist_$DISTRO.txt | sort -u > blacklist.txt
# Generate list of pkgs to be installed from available pkgs minus the ones blacklisted
- comm -23 /data/osmocom_packages_all.txt \
- /data/blacklist.txt > /data/osmocom_packages.txt
+ comm -23 osmocom_packages_all.txt \
+ blacklist.txt > osmocom_packages.txt
}
install_repo_packages_debian() {
@@ -112,10 +112,10 @@ install_repo_packages_debian() {
# https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html
aptitude search -F%p \
"?origin($OBS) ?architecture(native)" | sort \
- > /data/osmocom_packages_all.txt
+ > osmocom_packages_all.txt
filter_packages_txt
- apt install -y $(cat /data/osmocom_packages.txt)
+ apt install -y $(cat osmocom_packages.txt)
}
install_repo_packages_centos() {
@@ -127,10 +127,10 @@ install_repo_packages_centos() {
--repoid="network_osmocom_$FEED" \
--archlist="x86_64,noarch" \
--qf="%{name}" \
- > /data/osmocom_packages_all.txt
+ > osmocom_packages_all.txt
filter_packages_txt
- dnf install -y $(cat /data/osmocom_packages.txt)
+ dnf install -y $(cat osmocom_packages.txt)
}
test_binaries_version() {