Skip to content

Commit

Permalink
bumped to 1.9.3 and added support of RUNNER_OUTPUT_LIMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalLumberjack committed Jan 14, 2017
1 parent 688b056 commit 974e3f2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 16 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
FROM ubuntu:xenial
MAINTAINER [email protected]


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 \
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 974e3f2

Please sign in to comment.