Compare commits

..

No commits in common. "5b35d10ad8392f4b339c6ee4f646bac2b2484541" and "f62dd60f0171351fc4386ae48934b23036b45be0" have entirely different histories.

2 changed files with 0 additions and 75 deletions

View File

@ -1,66 +0,0 @@
#!/sbin/openrc-run
# From https://github.com/0x17de/dockerservice-openrc
: ${SUBCFGDIR:=/srv/docker}
DOCKER_COMPOSE_UP_ARGS=${DOCKER_COMPOSE_UP_ARGS-"--no-build --no-recreate --no-deps"}
SUBSVC="${SVCNAME#*.}"
[ -z "${SUBSVC}" ] && exit 1
: ${SUBCFG:="${SUBCFGDIR}/${SUBSVC}/docker-compose.yml"}
DOCOCMD="/usr/bin/docker"
export COMPOSE_HTTP_TIMEOUT=300
description="Manage Docker services defined in ${SUBCFG}"
extra_commands="configtest build"
description_configtest="Check configuration via \"docker compose -f ${SUBCFG} config\""
description_build="Run \"docker compose -f ${SUBCFG} build\""
depend() {
need localmount net docker
use dns
after docker
}
configtest() {
if ! [ -f "${SUBCFG}" ]; then
eerror "The config file ${SUBCFG} does not exist!"
return 1
fi
"${DOCOCMD}" -f "${SUBCFG}" config >&/dev/null
if [ ${?} -ne 0 ]; then
einfo "config: ok"
else
eerror "config: error"
return 1
fi
}
build() {
configtest || return 1
ebegin "Building dockerservice ${SUBSVC}"
"${DOCOCMD}" compose -f "${SUBCFG}" build
eend $?
}
start() {
configtest || return 1
ebegin "Starting dockerservice ${SUBSVC}"
"${DOCOCMD}" compose -f "${SUBCFG}" up -d ${DOCKER_COMPOSE_UP_ARGS}
eend $?
}
stop() {
ebegin "Stopping dockerservice ${SUBSVC}"
"${DOCOCMD}" compose -f "${SUBCFG}" stop --timeout=300
eend $?
}
status() {
if [ "$("${DOCOCMD}" compose -f "${SUBCFG}" top | wc -l)" -gt "0" ]; then
einfo "status: started"
else
einfo "status: stopped"
return 3
fi
}

View File

@ -1,9 +0,0 @@
version: "3.9"
services:
jslave:
env_file:
- /etc/jslave/jslave.conf
image: "reg.cadoles.com/cadoles/jenkins-slave:latest"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /srv/jenkins/workspace:/workspace