diff --git a/Changelog.md b/Changelog.md index cab1038..8ed2e60 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,12 @@ # Changelog +**1.9.3** + - gitlab-ci-multi-runner: upgrade to 1.9.3 + - added support of RUNNER_OUTPUT_LIMIT + +**1.9.0-1** + - fix restart of container + **1.9.0** - gitlab-ci-multi-runner: upgrade to 1.9.0 - added concurrent jobs support diff --git a/Dockerfile b/Dockerfile index 462414f..aa4a8d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,32 @@ FROM ubuntu:xenial MAINTAINER sameer@damagehead.com + RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends \ && echo 'APT::Install-Suggests 0;' >> /etc/apt/apt.conf.d/01norecommends \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \ vim.tiny wget sudo net-tools ca-certificates unzip git openssh-client curl libapparmor1 -ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.9.0 \ +ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.9.3 \ GITLAB_CI_MULTI_RUNNER_USER=gitlab_ci_multi_runner \ GITLAB_CI_MULTI_RUNNER_HOME_DIR="/home/gitlab_ci_multi_runner" ENV GITLAB_CI_MULTI_RUNNER_DATA_DIR="${GITLAB_CI_MULTI_RUNNER_HOME_DIR}/data" +ENV CA_CERTIFICATES_PATH='' +ENV RUNNER_CONCURRENT='' +ENV CI_SERVER_URL='' +ENV RUNNER_TOKEN='' +ENV RUNNER_EXECUTOR='docker' +ENV RUNNER_DESCRIPTION='' + +ENV RUNNER_DOCKER_IMAGE='docker:latest' +ENV RUNNER_DOCKER_MODE='socket' +ENV RUNNER_DOCKER_PRIVATE_REGISTRY_URL='' +ENV RUNNER_DOCKER_PRIVATE_REGISTRY_TOKEN='' +ENV RUNNER_DOCKER_ADDITIONAL_VOLUME='' +ENV RUNNER_OUTPUT_LIMIT='4096' + RUN wget -O /usr/local/bin/gitlab-ci-multi-runner \ https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/v${GITLAB_CI_MULTI_RUNNER_VERSION}/binaries/gitlab-ci-multi-runner-linux-amd64 \ && chmod 0755 /usr/local/bin/gitlab-ci-multi-runner \ diff --git a/README.md b/README.md index e088e25..3fae6c0 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,8 @@ docker build -t digitallumberjack/gitlab-ci-multi-runner github.com/digitallumbe Before a runner can process your CI jobs, it needs to be authorized to access the the GitLab CI server. The `CI_SERVER_URL`, `RUNNER_TOKEN`, `RUNNER_DESCRIPTION` and `RUNNER_EXECUTOR` environment variables are used to register the runner on GitLab CI. +You can use any ENV variable supported by the gitlab ci runner. + ```bash docker run --name gitlab-ci-multi-runner -d --restart=always \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ @@ -104,7 +106,13 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ digitallumberjack/gitlab-ci-multi-runner:1.9.0 ``` +If you want to share volumes between your containers and the runner in socket mode, use the `RUNNER_DOCKER_ADDITIONAL_VOLUME` variable to share `/builds:/builds`. + +You can increase the log maximum size by setting the RUNNER_OUTPUT_LIMIT variable (in kb) + + See https://docs.gitlab.com/ce/ci/docker/using_docker_build.html for more info. + ## Concurrent jobs You an setup your runner to start multiple job in parallel by setting the environment variable `RUNNER_CONCURRENT` to the number of jobs you want to run concurrently. diff --git a/entrypoint.sh b/entrypoint.sh index 0471c7e..c447eb8 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -71,7 +71,7 @@ configure_ci_runner() { fi sudo -HEu ${GITLAB_CI_MULTI_RUNNER_USER} \ gitlab-ci-multi-runner register --config ${GITLAB_CI_MULTI_RUNNER_DATA_DIR}/config.toml \ - -n -u "${CI_SERVER_URL}" -r "${RUNNER_TOKEN}" --name "${RUNNER_DESCRIPTION}" --executor "${RUNNER_EXECUTOR}" ${RUNNER_DOCKER_ARGS} + -n -u "${CI_SERVER_URL}" -r "${RUNNER_TOKEN}" --name "${RUNNER_DESCRIPTION}" --executor "${RUNNER_EXECUTOR}" --output-limit "${RUNNER_OUTPUT_LIMIT}" ${RUNNER_DOCKER_ARGS} else sudo -HEu ${GITLAB_CI_MULTI_RUNNER_USER} \ gitlab-ci-multi-runner register --config ${GITLAB_CI_MULTI_RUNNER_DATA_DIR}/config.toml