Sunil Mohan Adapa 61fde67ba6
ci: Add a custom driver for gitlab runner for podman
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-15 18:56:34 +03:00

15 lines
418 B
Bash
Executable File

#!/usr/bin/bash
# SPDX-License-Identifier: AGPL-3.0-or-later
set -eo pipefail
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source ${current_dir}/base.sh # Get variables from base.
podman exec --interactive "$CONTAINER_ID" /bin/bash < "${1}"
if [ $? -ne 0 ]; then
# Exit using the variable, to make the build as failure in GitLab
# CI.
exit $BUILD_FAILURE_EXIT_CODE
fi