Files
grm/scripts/molecule_all.sh
T
Emil SimeonovandDevin <158243242+devin-ai-integration[bot]@users.noreply.github.com> 43b2a01361
CI / quality (pull_request) Successful in 1m3s
CI / molecule-tests (1) (pull_request) Failing after 2m35s
CI / molecule-tests (0) (pull_request) Failing after 3m30s
CI / molecule-tests (2) (pull_request) Failing after 3m26s
fix: use systemd as container command for rootless molecule tests
Rootless Docker requires loginctl enable-linger and systemctl --user,
which need systemd as PID 1 inside the container. Updated all platform
entries to use /lib/systemd/systemd (or /usr/lib/systemd/systemd for
Arch) as the container command instead of sleep infinity.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-06-20 21:12:43 +02:00

35 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# Run all molecule scenarios on all supported OS platforms.
# Used by `make molecule-all`. Sequential — CI uses parallel matrix instead.
set -euo pipefail
MOLECULE_BIN="$(realpath "${BIN:-.venv/bin}/molecule")"
ROLE_DIR="$(cd "$(dirname "$0")/.." && pwd)/ansible/roles/gitea-runner"
for p in \
ubuntu-2204:geerlingguy/docker-ubuntu2204-ansible:latest:/lib/systemd/systemd \
ubuntu-2404:geerlingguy/docker-ubuntu2404-ansible:latest:/lib/systemd/systemd \
debian-12:geerlingguy/docker-debian12-ansible:latest:/lib/systemd/systemd \
archlinux:marcstraube/archlinux-ansible:latest:/usr/lib/systemd/systemd
do
IFS=":" read -r name image command <<< "$p"
export MOLECULE_PLATFORM_NAME="$name" MOLECULE_PLATFORM_IMAGE="$image"
if [ -n "$command" ]; then
export MOLECULE_PLATFORM_COMMAND="$command"
else
unset MOLECULE_PLATFORM_COMMAND
fi
echo "=== Platform: $name ==="
for s in default multi-instance lifecycle template-content deregister update; do
echo "--- Scenario: $s on $name ---"
(
cd "$ROLE_DIR"
if [ "$s" = "default" ]; then
ANSIBLE_ALLOW_BROKEN_CONDITIONALS=true ANSIBLE_INJECT_INVOCATION=1 "$MOLECULE_BIN" test
else
ANSIBLE_ALLOW_BROKEN_CONDITIONALS=true ANSIBLE_INJECT_INVOCATION=1 "$MOLECULE_BIN" test -s "$s"
fi
)
done
done