...
 
Commits (3)
......@@ -13,16 +13,26 @@ fi
(
set -ex
cd "${WORKDIR}/${BUILDDIR}"
dpkg -s apt-utils &>/dev/null || sudo apt-get install -y apt-utils
apt-ftparchive packages . > Packages
#dpkg -s apt-utils &>/dev/null || sudo apt-get install -y apt-utils
#apt-ftparchive packages . > Packages
echo "deb [trusted=yes] file:$(pwd)/ ./" | sudo tee /etc/apt/sources.list.d/local.list
sudo apt-get update
)
if [ -f "${WORKDIR}/testing/start_test.sh" ]; then
echo "Running testing/start_test.sh script"
"${WORKDIR}/testing/start_test.sh"
test_script=
if [ -f "${ICINGA_BUILD_DEB_FLAVOR}/debian/icinga-build-test" ]; then
test_script="${ICINGA_BUILD_DEB_FLAVOR}/debian/icinga-build-test"
elif [ -f "debian/icinga-build-test" ]; then
test_script="debian/icinga-build-test"
elif [ -f "${WORKDIR}/testing/start_test.sh" ]; then
test_script="${WORKDIR}/testing/start_test.sh"
fi
echo
if [ -n "${test_script}" ]; then
echo "[ Running script: ${test_script} ]"
${test_script}
else
echo "Falling back to pure package installation..."
echo "[ Falling back to pure package installation ]"
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y "${ICINGA_BUILD_PROJECT}"
fi
......@@ -25,11 +25,13 @@ REPO
sles|opensuse*)
(
set -ex
sudo zypper --non-interactive clean --all
#sudo zypper --non-interactive clean --all
sudo zypper --non-interactive --no-gpg-checks --gpg-auto-import-keys ref -fs
# Just use the local dir, zypper will take care of the rest!
sudo zypper addrepo --no-gpgcheck "$repository" local
if sudo zypper lr | grep -q "$repository"; then
sudo zypper addrepo --no-gpgcheck "$repository" local
fi
)
# Workaround for SLES 11 SP4
......@@ -54,10 +56,18 @@ REPO
;;
esac
if [ -f "${WORKDIR}/testing/start_test.sh" ]; then
echo "Running testing/start_test.sh script"
"${WORKDIR}/testing/start_test.sh"
test_script=
if [ -f "icinga-build-test" ]; then
test_script="icinga-build-test"
elif [ -f "${WORKDIR}/testing/start_test.sh" ]; then
test_script="${WORKDIR}/testing/start_test.sh"
fi
echo
if [ -n "${test_script}" ]; then
echo "[ Running script: ${test_script} ]"
${test_script}
else
echo "Falling back to pure package installation..."
echo "[ Falling back to pure package installation ]"
icinga-build-rpm-install "${ICINGA_BUILD_PROJECT}"
fi
......@@ -2,7 +2,7 @@
# detecting files
FILES_SPEC="$(ls ./*.spec 2>/dev/null)"
FILES_DEBIAN="$(ls -d ./*/debian 2>/dev/null)"
FILES_DEBIAN="$(ls -d ./debian ./*/debian 2>/dev/null)"
if [ -n "${FILES_SPEC}" ]; then
echo "Detected RPM source: ${FILES_SPEC}"
......@@ -13,7 +13,7 @@ if [ -n "${FILES_SPEC}" ]; then
fi
echo "[ test successful ]"
elif [ -n "${FILES_DEBIAN}" ]; then
echo "Detected Debian source files: ${FILES_DEBIAN}"
echo "Detected Debian packaging paths: ${FILES_DEBIAN}"
echo
if ! icinga-build-deb-test; then
echo "[ test failed! ]"
......