Skip to content

Commit 64c9741

Browse files
author
Daniel Bunte
committed
Adds feature flag to enable podman; fixes test runner
1 parent cd24311 commit 64c9741

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

_unit-test/_test_setup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ _ORIGIN=$(pwd)
77
rm -rf /tmp/sentry-self-hosted-test-sandbox.*
88
_SANDBOX="$(mktemp -d /tmp/sentry-self-hosted-test-sandbox.XXX)"
99

10+
source install/detect-container-engine.sh
1011
source install/detect-platform.sh
1112
docker build -t sentry-self-hosted-jq-local --platform="$DOCKER_PLATFORM" jq
1213

install/detect-container-engine.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
echo "${_group}Detecting container engine ..."
22

3-
export CONTAINER_ENGINE=""
4-
5-
if command -v podman &> /dev/null; then
6-
CONTAINER_ENGINE="podman"
3+
if [[ "${CONTAINER_ENGINE_PODMAN:-0}" -eq 1 ]] && command -v podman &> /dev/null; then
4+
export CONTAINER_ENGINE="podman"
75
elif command -v docker &> /dev/null; then
8-
CONTAINER_ENGINE="docker"
6+
export CONTAINER_ENGINE="docker"
97
else
108
echo "FAIL: Neither podman nor docker is installed on the system."
119
exit 1

install/parse-cli.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Options:
2929
--no-report-self-hosted-issues
3030
Do not report error and performance data about your
3131
self-hosted instance upstream to Sentry.
32+
--container-engine-podman
33+
Use podman as the container engine.
3234
EOF
3335
}
3436

@@ -46,6 +48,7 @@ MINIMIZE_DOWNTIME="${MINIMIZE_DOWNTIME:-}"
4648
SKIP_COMMIT_CHECK="${SKIP_COMMIT_CHECK:-}"
4749
REPORT_SELF_HOSTED_ISSUES="${REPORT_SELF_HOSTED_ISSUES:-}"
4850
SKIP_SSE42_REQUIREMENTS="${SKIP_SSE42_REQUIREMENTS:-}"
51+
CONTAINER_ENGINE_PODMAN="${CONTAINER_ENGINE_PODMAN:-}"
4952

5053
while (($#)); do
5154
case "$1" in
@@ -67,6 +70,7 @@ while (($#)); do
6770
--report-self-hosted-issues) REPORT_SELF_HOSTED_ISSUES=1 ;;
6871
--no-report-self-hosted-issues) REPORT_SELF_HOSTED_ISSUES=0 ;;
6972
--skip-sse42-requirements) SKIP_SSE42_REQUIREMENTS=1 ;;
73+
--container-engine-podman) CONTAINER_ENGINE_PODMAN=1 ;;
7074
--) ;;
7175
*)
7276
echo "Unexpected argument: $1. Use --help for usage information."

0 commit comments

Comments
 (0)