Skip to content

Commit 57ed09d

Browse files
Fix: Trying to find issue in Ci (#1288)
* Checking to see what is causing the current issue * Checking container is running * Try one more thing * Invoking correct priveledged settings * Add verbose * Make verbose * Wait a moment * Testing info * Removing check * Applying changes
1 parent fcb9fab commit 57ed09d

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

scripts/package-tests/Dockerfile.test.deb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ENV DEBIAN_FRONTEND noninteractive
99
RUN apt-get update ; \
1010
apt-get install -y systemd systemd-sysv procps; \
1111
apt-get clean ; \
12-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
12+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \
13+
printf '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d
1314

1415
CMD ["/lib/systemd/systemd"]

scripts/package-tests/package-tests.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ trap 'run_traps' EXIT
3636
# shellcheck source=scripts/package-tests/common.sh
3737
source "$SCRIPT_DIR"/common.sh
3838

39+
3940
if [[ -z "$PKG_PATH" ]]; then
4041
echo "usage: ${BASH_SOURCE[0]} DEB_OR_RPM_PATH" >&2
4142
exit 1
@@ -62,14 +63,22 @@ podman_cleanup() {
6263
}
6364
add_trap_func podman_cleanup
6465

66+
podman_logs() {
67+
echo "Container logs:"
68+
podman logs "$container_name" || true
69+
}
70+
add_trap_func podman_logs
71+
6572
podman build -t "$image_name" -f "$SCRIPT_DIR/Dockerfile.test.$pkg_type" "$SCRIPT_DIR"
6673
podman rm -fv "$container_name" >/dev/null 2>&1 || true
6774

6875
# test install
69-
podman run --name "$container_name" -d "$image_name"
76+
podman run --name "$container_name" --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro -d "$image_name"
7077

7178
# ensure that the system is up and running by checking if systemctl is running
72-
$container_exec systemctl is-system-running --quiet --wait
79+
# TODO(MovieStoreGuy): re-enable when we have a way validate that systemd is fully running
80+
# $container_exec systemctl is-system-running --wait --quiet
81+
7382
install_pkg "$container_name" "$PKG_PATH"
7483

7584
# If we got to this point, we might need to check the logs of the systemd service

0 commit comments

Comments
 (0)