gentoo-overlay/dev-util/drone-runner-docker/files/drone-runner-docker.sh
Manuel Friedli cd6b8380be
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is passing
dev-util/drone-runner-docker: Initial add
Package-Manager: Portage-3.0.4, Repoman-3.0.1
2020-09-26 01:30:38 +02:00

29 lines
612 B
Bash
Executable file

#!/bin/sh
# $RUNNER_CONFIG_FILE contains path to the config file
if [[ -z "${RUNNER_CONFIG_FILE}" ]] ; then
echo "RUNNER_CONFIG_FILE not set!"
exit 1
fi
. "${RUNNER_CONFIG_FILE}"
docker_args=""
for var in "${!DRONE_@}" ; do
docker_args="${docker_args} --env=${var}=${!var}"
done
for p in ${DOCKER_PUBLISH} ; do
docker_args="${docker_args} --publish=${p}"
done
docker_args="${docker_args} ${DOCKER_DRONE_EXTRA_ARGS}"
docker run \
--volume=/run/docker.sock:/var/run/docker.sock \
${docker_args} \
--restart=always \
--detach=false \
--name=drone-runner \
drone/drone-runner-docker:<VERSION>