.ci/gitlab-runner/custom-driver/run.sh
raw| 1 | #!/usr/bin/bash |
| 2 | # SPDX-License-Identifier: AGPL-3.0-or-later |
| 3 | |
| 4 | set -eo pipefail |
| 5 | |
| 6 | current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
| 7 | source ${current_dir}/base.sh # Get variables from base. |
| 8 | |
| 9 | podman exec --interactive "$CONTAINER_ID" /bin/bash < "${1}" |
| 10 | if [ $? -ne 0 ]; then |
| 11 | # Exit using the variable, to make the build as failure in GitLab |
| 12 | # CI. |
| 13 | exit $BUILD_FAILURE_EXIT_CODE |
| 14 | fi |