From 1fede7b14fab73bced606a991f647ecf56c99867 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Sat, 22 Oct 2016 09:58:34 +0200 Subject: [PATCH 01/21] Upgrade gitlab-ci-multi-runner to v1.7.0 --- Changelog.md | 3 +++ Dockerfile | 2 +- README.md | 12 ++++++------ VERSION | 2 +- docker-compose.yml | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Changelog.md b/Changelog.md index 3fdf98c..354322d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +**v1.7.0** +- gitlab-ci-multi-runner: upgrade to v1.7.0 + **1.1.4** - gitlab-ci-multi-runner: upgrade to 1.1.4 diff --git a/Dockerfile b/Dockerfile index 626f28e..0c48dca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM sameersbn/ubuntu:14.04.20161014 MAINTAINER sameer@damagehead.com -ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.1.4 \ +ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.7.0 \ 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" diff --git a/README.md b/README.md index cb529be..e74479b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Docker Repository on Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner/status "Docker Repository on Quay.io")](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) -# sameersbn/gitlab-ci-multi-runner:1.1.4-5 +# sameersbn/gitlab-ci-multi-runner:1.7.0 - [Introduction](#introduction) - [Contributing](#contributing) @@ -51,7 +51,7 @@ Automated builds of the image are available on [Dockerhub](https://hub.docker.co > **Note**: Builds are also available on [Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) ```bash -docker pull sameersbn/gitlab-ci-multi-runner:1.1.4-5 +docker pull sameersbn/gitlab-ci-multi-runner:1.7.0 ``` Alternatively you can build the image yourself. @@ -69,7 +69,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=shell' \ - sameersbn/gitlab-ci-multi-runner:1.1.4-5 + sameersbn/gitlab-ci-multi-runner:1.7.0 ``` *Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)* @@ -83,7 +83,7 @@ You can customize the launch command by specifying arguments to `gitlab-ci-multi ```bash docker run --name gitlab-ci-multi-runner -it --rm \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ - sameersbn/gitlab-ci-multi-runner:1.1.4-5 --help + sameersbn/gitlab-ci-multi-runner:1.7.0 --help ``` ## Persistence @@ -131,7 +131,7 @@ To upgrade to newer releases: 1. Download the updated Docker image: ```bash - docker pull sameersbn/gitlab-ci-multi-runner:1.1.4-5 + docker pull sameersbn/gitlab-ci-multi-runner:1.7.0 ``` 2. Stop the currently running image: @@ -151,7 +151,7 @@ To upgrade to newer releases: ```bash docker run -name gitlab-ci-multi-runner -d \ [OPTIONS] \ - sameersbn/gitlab-ci-multi-runner:1.1.4-5 + sameersbn/gitlab-ci-multi-runner:1.7.0 ``` ## Shell Access diff --git a/VERSION b/VERSION index 268838f..bd8bf88 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.4-5 +1.7.0 diff --git a/docker-compose.yml b/docker-compose.yml index 37c5981..21c4cab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ GitlabCIMultiRunner: - image: sameersbn/gitlab-ci-multi-runner:1.1.4-5 + image: sameersbn/gitlab-ci-multi-runner:1.7.0 volumes: - /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data environment: From 0337d65ad1728e879c6139f6248da03a88a30c6d Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Sat, 22 Oct 2016 14:11:06 +0200 Subject: [PATCH 02/21] added docker executor support You can use the docker executor by using `RUNNER_EXECUTOR=docker`. You must provide a docker image to use in `RUNNER_DOCKER_IMAGE` (e.g. docker:latest) If `RUNNER_DOCKER_MODE` is set to `socket`, the docker socket is shared between the runner and the build container. If it is not, you must use docker in docker service in your .gitlabci.yml definitions. See https://docs.gitlab.com/ce/ci/docker/using_docker_build.html for more info. --- Changelog.md | 3 +++ README.md | 20 ++++++++++++++------ VERSION | 2 +- entrypoint.sh | 10 +++++++++- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/Changelog.md b/Changelog.md index 3fdf98c..e534f78 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +**1.1.4-6** + - added docker executor + **1.1.4** - gitlab-ci-multi-runner: upgrade to 1.1.4 diff --git a/README.md b/README.md index cb529be..939170d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Docker Repository on Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner/status "Docker Repository on Quay.io")](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) -# sameersbn/gitlab-ci-multi-runner:1.1.4-5 +# sameersbn/gitlab-ci-multi-runner:1.1.4-6 - [Introduction](#introduction) - [Contributing](#contributing) @@ -51,7 +51,7 @@ Automated builds of the image are available on [Dockerhub](https://hub.docker.co > **Note**: Builds are also available on [Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) ```bash -docker pull sameersbn/gitlab-ci-multi-runner:1.1.4-5 +docker pull sameersbn/gitlab-ci-multi-runner:1.1.4-6 ``` Alternatively you can build the image yourself. @@ -69,13 +69,21 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=shell' \ - sameersbn/gitlab-ci-multi-runner:1.1.4-5 + sameersbn/gitlab-ci-multi-runner:1.1.4-6 ``` *Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)* Update the values of `CI_SERVER_URL`, `RUNNER_TOKEN` and `RUNNER_DESCRIPTION` in the above command. If these enviroment variables are not specified, you will be prompted to enter these details interactively on first run. +## Using docker executor + +You can use the docker executor by using `RUNNER_EXECUTOR=docker`. You must provide a docker image to use in `RUNNER_DOCKER_IMAGE` (e.g. docker:latest) + +If `RUNNER_DOCKER_MODE` is set to `socket`, the docker socket is shared between the runner and the build container. If it is not, you must use docker in docker service in your .gitlabci.yml definitions. + +See https://docs.gitlab.com/ce/ci/docker/using_docker_build.html for more info. + ## Command-line arguments You can customize the launch command by specifying arguments to `gitlab-ci-multi-runner` on the `docker run` command. For example the following command prints the help menu of `gitlab-ci-multi-runner` command: @@ -83,7 +91,7 @@ You can customize the launch command by specifying arguments to `gitlab-ci-multi ```bash docker run --name gitlab-ci-multi-runner -it --rm \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ - sameersbn/gitlab-ci-multi-runner:1.1.4-5 --help + sameersbn/gitlab-ci-multi-runner:1.1.4-6 --help ``` ## Persistence @@ -131,7 +139,7 @@ To upgrade to newer releases: 1. Download the updated Docker image: ```bash - docker pull sameersbn/gitlab-ci-multi-runner:1.1.4-5 + docker pull sameersbn/gitlab-ci-multi-runner:1.1.4-6 ``` 2. Stop the currently running image: @@ -151,7 +159,7 @@ To upgrade to newer releases: ```bash docker run -name gitlab-ci-multi-runner -d \ [OPTIONS] \ - sameersbn/gitlab-ci-multi-runner:1.1.4-5 + sameersbn/gitlab-ci-multi-runner:1.1.4-6 ``` ## Shell Access diff --git a/VERSION b/VERSION index 268838f..fce5864 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.4-5 +1.1.4-6 diff --git a/entrypoint.sh b/entrypoint.sh index 3e2c19c..62bfe50 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -50,9 +50,17 @@ grant_access_to_docker_socket() { configure_ci_runner() { if [[ ! -e ${GITLAB_CI_MULTI_RUNNER_DATA_DIR}/config.toml ]]; then if [[ -n ${CI_SERVER_URL} && -n ${RUNNER_TOKEN} && -n ${RUNNER_DESCRIPTION} && -n ${RUNNER_EXECUTOR} ]]; then + if [[ "${RUNNER_EXECUTOR}" == "docker" ]];then + if [[ -n ${RUNNER_DOCKER_IMAGE} ]];then + RUNNER_DOCKER_ARGS="--docker-privileged --docker-image ${RUNNER_DOCKER_IMAGE}" + fi + if [[ "${RUNNER_DOCKER_MODE}" == "socket" ]];then + RUNNER_DOCKER_ARGS="$RUNNER_DOCKER_ARGS --docker-volumes /var/run/docker.sock:/var/run/docker.sock" + fi + 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}" + -n -u "${CI_SERVER_URL}" -r "${RUNNER_TOKEN}" --name "${RUNNER_DESCRIPTION}" --executor "${RUNNER_EXECUTOR}" ${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 From 21bdf60e69e2f80c767df70fb3c6e4df6b35cf25 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Sun, 23 Oct 2016 17:44:56 +0200 Subject: [PATCH 03/21] added docker private registry support --- entrypoint.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 62bfe50..8e9d5c9 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -47,6 +47,14 @@ grant_access_to_docker_socket() { fi } +configure_docker_credentials() { + if [[ -n "${RUNNER_DOCKER_PRIVATE_REGISTRY_URL}" && -n "${RUNNER_DOCKER_PRIVATE_REGISTRY_TOKEN}" ]];then + sudo -HEu ${GITLAB_CI_MULTI_RUNNER_USER} mkdir "${GITLAB_CI_MULTI_RUNNER_HOME_DIR}/.docker" + sudo -HEu ${GITLAB_CI_MULTI_RUNNER_USER} \ + echo "\"auths\": {\"${RUNNER_DOCKER_PRIVATE_REGISTRY_URL}\": {\"auth\": \"${RUNNER_DOCKER_PRIVATE_REGISTRY_TOKEN}\"}}}" > "${GITLAB_CI_MULTI_RUNNER_HOME_DIR}/.docker/config.json" + fi +} + configure_ci_runner() { if [[ ! -e ${GITLAB_CI_MULTI_RUNNER_DATA_DIR}/config.toml ]]; then if [[ -n ${CI_SERVER_URL} && -n ${RUNNER_TOKEN} && -n ${RUNNER_DESCRIPTION} && -n ${RUNNER_EXECUTOR} ]]; then @@ -84,6 +92,7 @@ if [[ -z ${1} ]]; then generate_ssh_deploy_keys grant_access_to_docker_socket configure_ci_runner + configure_docker_credentials start-stop-daemon --start \ --chuid ${GITLAB_CI_MULTI_RUNNER_USER}:${GITLAB_CI_MULTI_RUNNER_USER} \ From c78eeff6985af7747bcaa8627ed2b734c5a1f7c8 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Tue, 15 Nov 2016 15:30:47 +0100 Subject: [PATCH 04/21] fixed auth for docker --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 8e9d5c9..e3a2b70 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -51,7 +51,7 @@ configure_docker_credentials() { if [[ -n "${RUNNER_DOCKER_PRIVATE_REGISTRY_URL}" && -n "${RUNNER_DOCKER_PRIVATE_REGISTRY_TOKEN}" ]];then sudo -HEu ${GITLAB_CI_MULTI_RUNNER_USER} mkdir "${GITLAB_CI_MULTI_RUNNER_HOME_DIR}/.docker" sudo -HEu ${GITLAB_CI_MULTI_RUNNER_USER} \ - echo "\"auths\": {\"${RUNNER_DOCKER_PRIVATE_REGISTRY_URL}\": {\"auth\": \"${RUNNER_DOCKER_PRIVATE_REGISTRY_TOKEN}\"}}}" > "${GITLAB_CI_MULTI_RUNNER_HOME_DIR}/.docker/config.json" + echo "{\"auths\": {\"${RUNNER_DOCKER_PRIVATE_REGISTRY_URL}\": {\"auth\": \"${RUNNER_DOCKER_PRIVATE_REGISTRY_TOKEN}\"}}}" > "${GITLAB_CI_MULTI_RUNNER_HOME_DIR}/.docker/config.json" fi } From ee2edcfb4957582a60fbe4e9a0528855105dce5b Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Mon, 21 Nov 2016 18:27:23 +0900 Subject: [PATCH 05/21] update to xenial --- Dockerfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0c48dca..087cb46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,18 @@ -FROM sameersbn/ubuntu:14.04.20161014 +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-core openssh-client curl libapparmor1 + ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.7.0 \ 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" -RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E1DD270288B4E6030699E45FA1715D88E1DF1F24 \ - && echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu trusty main" >> /etc/apt/sources.list \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - git-core openssh-client curl libapparmor1 \ - && wget -O /usr/local/bin/gitlab-ci-multi-runner \ +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 \ && adduser --disabled-login --gecos 'GitLab CI Runner' ${GITLAB_CI_MULTI_RUNNER_USER} \ @@ -21,6 +22,8 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E1DD270288B4E60 COPY entrypoint.sh /sbin/entrypoint.sh RUN chmod 755 /sbin/entrypoint.sh +RUN rm -rf /var/lib/apt/lists/* + VOLUME ["${GITLAB_CI_MULTI_RUNNER_DATA_DIR}"] WORKDIR "${GITLAB_CI_MULTI_RUNNER_HOME_DIR}" ENTRYPOINT ["/sbin/entrypoint.sh"] From 0de46ba5a02f3e1f35d4e1fe2b8a37a943ab5833 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Mon, 21 Nov 2016 18:34:19 +0900 Subject: [PATCH 06/21] git-core -> git --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 087cb46..5e9332c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ 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-core openssh-client curl libapparmor1 + vim.tiny wget sudo net-tools ca-certificates unzip git openssh-client curl libapparmor1 ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.7.0 \ GITLAB_CI_MULTI_RUNNER_USER=gitlab_ci_multi_runner \ From 89a554b9526ef7b2b664215cc0618b785b5ac226 Mon Sep 17 00:00:00 2001 From: Pieter Maes Date: Fri, 25 Nov 2016 14:25:51 +0100 Subject: [PATCH 07/21] gitlab-ci-multi-runner: upgrade to 1.8.0 --- Changelog.md | 3 +++ Dockerfile | 2 +- README.md | 12 ++++++------ VERSION | 2 +- docker-compose.yml | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Changelog.md b/Changelog.md index 3fdf98c..e0c2637 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +**1.8.0** + - gitlab-ci-multi-runner: upgrade to 1.8.0 + **1.1.4** - gitlab-ci-multi-runner: upgrade to 1.1.4 diff --git a/Dockerfile b/Dockerfile index 626f28e..d88ddcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM sameersbn/ubuntu:14.04.20161014 MAINTAINER sameer@damagehead.com -ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.1.4 \ +ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.8.0 \ 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" diff --git a/README.md b/README.md index cb529be..919f193 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Docker Repository on Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner/status "Docker Repository on Quay.io")](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) -# sameersbn/gitlab-ci-multi-runner:1.1.4-5 +# sameersbn/gitlab-ci-multi-runner:1.8.0 - [Introduction](#introduction) - [Contributing](#contributing) @@ -51,7 +51,7 @@ Automated builds of the image are available on [Dockerhub](https://hub.docker.co > **Note**: Builds are also available on [Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) ```bash -docker pull sameersbn/gitlab-ci-multi-runner:1.1.4-5 +docker pull sameersbn/gitlab-ci-multi-runner:1.8.0 ``` Alternatively you can build the image yourself. @@ -69,7 +69,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=shell' \ - sameersbn/gitlab-ci-multi-runner:1.1.4-5 + sameersbn/gitlab-ci-multi-runner:1.8.0 ``` *Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)* @@ -83,7 +83,7 @@ You can customize the launch command by specifying arguments to `gitlab-ci-multi ```bash docker run --name gitlab-ci-multi-runner -it --rm \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ - sameersbn/gitlab-ci-multi-runner:1.1.4-5 --help + sameersbn/gitlab-ci-multi-runner:1.8.0 --help ``` ## Persistence @@ -131,7 +131,7 @@ To upgrade to newer releases: 1. Download the updated Docker image: ```bash - docker pull sameersbn/gitlab-ci-multi-runner:1.1.4-5 + docker pull sameersbn/gitlab-ci-multi-runner:1.8.0 ``` 2. Stop the currently running image: @@ -151,7 +151,7 @@ To upgrade to newer releases: ```bash docker run -name gitlab-ci-multi-runner -d \ [OPTIONS] \ - sameersbn/gitlab-ci-multi-runner:1.1.4-5 + sameersbn/gitlab-ci-multi-runner:1.8.0 ``` ## Shell Access diff --git a/VERSION b/VERSION index 268838f..27f9cd3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.4-5 +1.8.0 diff --git a/docker-compose.yml b/docker-compose.yml index 37c5981..1f8f9b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ GitlabCIMultiRunner: - image: sameersbn/gitlab-ci-multi-runner:1.1.4-5 + image: sameersbn/gitlab-ci-multi-runner:1.8.0 volumes: - /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data environment: From 97d5e51053c42ad8f82cab078c939fab63b42028 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Thu, 29 Dec 2016 16:17:48 +0100 Subject: [PATCH 08/21] bumped to v1.9.0 of gitlab runner --- Changelog.md | 3 +++ Dockerfile | 2 +- README.md | 42 ++++++++++++++++++++++++++++++++---------- VERSION | 2 +- docker-compose.yml | 2 +- 5 files changed, 38 insertions(+), 13 deletions(-) diff --git a/Changelog.md b/Changelog.md index 5e5ffb3..c3f7d76 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +**1.9.0** + - gitlab-ci-multi-runner: upgrade to 1.9.0 + **1.8.0** - gitlab-ci-multi-runner: upgrade to 1.8.0 diff --git a/Dockerfile b/Dockerfile index d6fc172..462414f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends \ && 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.8.0 \ +ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.9.0 \ 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" diff --git a/README.md b/README.md index a41e9a4..cec45fe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[![Docker Repository on Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner/status "Docker Repository on Quay.io")](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) +[![Docker Repository on Quay.io](https://quay.io/repository/digitallumberjack/gitlab-ci-multi-runner/status "Docker Repository on Quay.io")](https://quay.io/repository/digitallumberjack/gitlab-ci-multi-runner) -# sameersbn/gitlab-ci-multi-runner:1.8.0 +# digitallumberjack/gitlab-ci-multi-runner:1.9.0 - [Introduction](#introduction) - [Contributing](#contributing) @@ -46,18 +46,18 @@ If the above recommendations do not help then [report your issue](../../issues/n ## Installation -Automated builds of the image are available on [Dockerhub](https://hub.docker.com/r/sameersbn/gitlab-ci-multi-runner) and is the recommended method of installation. +Automated builds of the image are available on [Dockerhub](https://hub.docker.com/r/digitallumberjack/gitlab-ci-multi-runner) and is the recommended method of installation. -> **Note**: Builds are also available on [Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) +> **Note**: Builds are also available on [Quay.io](https://quay.io/repository/digitallumberjack/gitlab-ci-multi-runner) ```bash -docker pull sameersbn/gitlab-ci-multi-runner:1.8.0 +docker pull digitallumberjack/gitlab-ci-multi-runner:1.9.0 ``` Alternatively you can build the image yourself. ```bash -docker build -t sameersbn/gitlab-ci-multi-runner github.com/sameersbn/docker-gitlab-ci-multi-runner +docker build -t digitallumberjack/gitlab-ci-multi-runner github.com/sameersbn/docker-gitlab-ci-multi-runner ``` ## Quickstart @@ -69,7 +69,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=shell' \ - sameersbn/gitlab-ci-multi-runner:1.8.0 + digitallumberjack/gitlab-ci-multi-runner:1.9.0 ``` *Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)* @@ -82,6 +82,28 @@ You can use the docker executor by using `RUNNER_EXECUTOR=docker`. You must prov If `RUNNER_DOCKER_MODE` is set to `socket`, the docker socket is shared between the runner and the build container. If it is not, you must use docker in docker service in your .gitlabci.yml definitions. +Start the docker runner in socket mode : +```bash +docker run --name gitlab-ci-multi-runner -d --restart=always \ + --volume /var/run/docker.sock:/var/run/docker.sock + --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ + --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ + --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=docker' \ + --env='RUNNER_DOCKER_IMAGE=docker:latest' --env='RUNNER_DOCKER_MODE=socket' + digitallumberjack/gitlab-ci-multi-runner:1.9.0 +``` + +Start the docker runner in dind mode : +```bash +docker run --name gitlab-ci-multi-runner -d --restart=always \ + --volume /var/run/docker.sock:/var/run/docker.sock + --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ + --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ + --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=docker' \ + --env='RUNNER_DOCKER_IMAGE=docker:latest' --env='RUNNER_DOCKER_MODE=dind' + digitallumberjack/gitlab-ci-multi-runner:1.9.0 +``` + See https://docs.gitlab.com/ce/ci/docker/using_docker_build.html for more info. ## Command-line arguments @@ -91,7 +113,7 @@ You can customize the launch command by specifying arguments to `gitlab-ci-multi ```bash docker run --name gitlab-ci-multi-runner -it --rm \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ - sameersbn/gitlab-ci-multi-runner:1.8.0 --help + digitallumberjack/gitlab-ci-multi-runner:1.9.0 --help ``` ## Persistence @@ -139,7 +161,7 @@ To upgrade to newer releases: 1. Download the updated Docker image: ```bash - docker pull sameersbn/gitlab-ci-multi-runner:1.8.0 + docker pull digitallumberjack/gitlab-ci-multi-runner:1.9.0 ``` 2. Stop the currently running image: @@ -159,7 +181,7 @@ To upgrade to newer releases: ```bash docker run -name gitlab-ci-multi-runner -d \ [OPTIONS] \ - sameersbn/gitlab-ci-multi-runner:1.8.0 + digitallumberjack/gitlab-ci-multi-runner:1.9.0 ``` ## Shell Access diff --git a/VERSION b/VERSION index 27f9cd3..f8e233b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.0 +1.9.0 diff --git a/docker-compose.yml b/docker-compose.yml index 674761f..6c69517 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ GitlabCIMultiRunner: - image: digitallumberjack/gitlab-ci-multi-runner:1.8.0 + image: digitallumberjack/gitlab-ci-multi-runner:1.9.0 volumes: - /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data environment: From 30865ea86d8afc64a71de6ba8cd46bd2d8d64a40 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Thu, 29 Dec 2016 16:53:44 +0100 Subject: [PATCH 09/21] added support of RUNNER_CONCURRENT to set parallels jobs --- Changelog.md | 1 + README.md | 5 ++++- entrypoint.sh | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index c3f7d76..cab1038 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,7 @@ **1.9.0** - gitlab-ci-multi-runner: upgrade to 1.9.0 + - added concurrent jobs support **1.8.0** - gitlab-ci-multi-runner: upgrade to 1.8.0 diff --git a/README.md b/README.md index cec45fe..e088e25 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ docker pull digitallumberjack/gitlab-ci-multi-runner:1.9.0 Alternatively you can build the image yourself. ```bash -docker build -t digitallumberjack/gitlab-ci-multi-runner github.com/sameersbn/docker-gitlab-ci-multi-runner +docker build -t digitallumberjack/gitlab-ci-multi-runner github.com/digitallumberjack/docker-gitlab-ci-multi-runner ``` ## Quickstart @@ -105,6 +105,9 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ ``` 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. + ## Command-line arguments diff --git a/entrypoint.sh b/entrypoint.sh index e3a2b70..a1ef1d3 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -73,6 +73,9 @@ configure_ci_runner() { sudo -HEu ${GITLAB_CI_MULTI_RUNNER_USER} \ gitlab-ci-multi-runner register --config ${GITLAB_CI_MULTI_RUNNER_DATA_DIR}/config.toml fi + if [[ -n ${RUNNER_CONCURRENT} ]];then + sed -i "s/concurrent = .*/concurent = ${RUNNER_CONCURRENT}/" ${GITLAB_CI_MULTI_RUNNER_DATA_DIR}/config.toml + fi fi } From 936925498c6d5e4356c4e8eec5cbb01288c201a9 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Thu, 29 Dec 2016 19:55:02 +0100 Subject: [PATCH 10/21] added additonal volumes --- entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index a1ef1d3..0b9c519 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -65,6 +65,9 @@ configure_ci_runner() { if [[ "${RUNNER_DOCKER_MODE}" == "socket" ]];then RUNNER_DOCKER_ARGS="$RUNNER_DOCKER_ARGS --docker-volumes /var/run/docker.sock:/var/run/docker.sock" fi + if [[ -n ${RUNNER_DOCKER_ADDITIONAL_VOLUME} ]];then + RUNNER_DOCKER_ARGS="$RUNNER_DOCKER_ARGS --docker-volumes ${RUNNER_DOCKER_ADDITIONAL_VOLUME}" + fi fi sudo -HEu ${GITLAB_CI_MULTI_RUNNER_USER} \ gitlab-ci-multi-runner register --config ${GITLAB_CI_MULTI_RUNNER_DATA_DIR}/config.toml \ From 688b05622e9d20e564f6c6c310b7e21efae75d07 Mon Sep 17 00:00:00 2001 From: Matthieu Proucelle Date: Fri, 6 Jan 2017 17:22:49 +0100 Subject: [PATCH 11/21] fix reboot error where mkdir already existing directory --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 0b9c519..0471c7e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -48,7 +48,7 @@ grant_access_to_docker_socket() { } configure_docker_credentials() { - if [[ -n "${RUNNER_DOCKER_PRIVATE_REGISTRY_URL}" && -n "${RUNNER_DOCKER_PRIVATE_REGISTRY_TOKEN}" ]];then + if [[ -n "${RUNNER_DOCKER_PRIVATE_REGISTRY_URL}" && -n "${RUNNER_DOCKER_PRIVATE_REGISTRY_TOKEN}" && ! -e "${GITLAB_CI_MULTI_RUNNER_HOME_DIR}/.docker/config.json" ]];then sudo -HEu ${GITLAB_CI_MULTI_RUNNER_USER} mkdir "${GITLAB_CI_MULTI_RUNNER_HOME_DIR}/.docker" sudo -HEu ${GITLAB_CI_MULTI_RUNNER_USER} \ echo "{\"auths\": {\"${RUNNER_DOCKER_PRIVATE_REGISTRY_URL}\": {\"auth\": \"${RUNNER_DOCKER_PRIVATE_REGISTRY_TOKEN}\"}}}" > "${GITLAB_CI_MULTI_RUNNER_HOME_DIR}/.docker/config.json" From 974e3f2be71031807203961b2609f4273b46212a Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Sat, 14 Jan 2017 15:00:59 +0100 Subject: [PATCH 12/21] bumped to 1.9.3 and added support of RUNNER_OUTPUT_LIMIT --- Changelog.md | 7 +++++++ Dockerfile | 17 ++++++++++++++++- README.md | 8 ++++++++ entrypoint.sh | 2 +- 4 files changed, 32 insertions(+), 2 deletions(-) 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 From a7cace064403ad9cf7bb40a8a083241118ba7a25 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Thu, 26 Jan 2017 14:45:32 +0100 Subject: [PATCH 13/21] bumped to runner v1.10.2 --- Changelog.md | 3 +++ Dockerfile | 2 +- README.md | 16 ++++++++-------- VERSION | 2 +- docker-compose.yml | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Changelog.md b/Changelog.md index 8ed2e60..638d7c2 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +**1.10.2** + - gitlab-ci-multi-runner: upgrade to 1.10.2 + **1.9.3** - gitlab-ci-multi-runner: upgrade to 1.9.3 - added support of RUNNER_OUTPUT_LIMIT diff --git a/Dockerfile b/Dockerfile index aa4a8d6..60056f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends \ && 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.3 \ +ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.10.2 \ 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" diff --git a/README.md b/README.md index 3fae6c0..211634a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Docker Repository on Quay.io](https://quay.io/repository/digitallumberjack/gitlab-ci-multi-runner/status "Docker Repository on Quay.io")](https://quay.io/repository/digitallumberjack/gitlab-ci-multi-runner) -# digitallumberjack/gitlab-ci-multi-runner:1.9.0 +# digitallumberjack/gitlab-ci-multi-runner:1.10.2 - [Introduction](#introduction) - [Contributing](#contributing) @@ -51,7 +51,7 @@ Automated builds of the image are available on [Dockerhub](https://hub.docker.co > **Note**: Builds are also available on [Quay.io](https://quay.io/repository/digitallumberjack/gitlab-ci-multi-runner) ```bash -docker pull digitallumberjack/gitlab-ci-multi-runner:1.9.0 +docker pull digitallumberjack/gitlab-ci-multi-runner:1.10.2 ``` Alternatively you can build the image yourself. @@ -71,7 +71,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=shell' \ - digitallumberjack/gitlab-ci-multi-runner:1.9.0 + digitallumberjack/gitlab-ci-multi-runner:1.10.2 ``` *Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)* @@ -92,7 +92,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=docker' \ --env='RUNNER_DOCKER_IMAGE=docker:latest' --env='RUNNER_DOCKER_MODE=socket' - digitallumberjack/gitlab-ci-multi-runner:1.9.0 + digitallumberjack/gitlab-ci-multi-runner:1.10.2 ``` Start the docker runner in dind mode : @@ -103,7 +103,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=docker' \ --env='RUNNER_DOCKER_IMAGE=docker:latest' --env='RUNNER_DOCKER_MODE=dind' - digitallumberjack/gitlab-ci-multi-runner:1.9.0 + digitallumberjack/gitlab-ci-multi-runner:1.10.2 ``` 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`. @@ -124,7 +124,7 @@ You can customize the launch command by specifying arguments to `gitlab-ci-multi ```bash docker run --name gitlab-ci-multi-runner -it --rm \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ - digitallumberjack/gitlab-ci-multi-runner:1.9.0 --help + digitallumberjack/gitlab-ci-multi-runner:1.10.2 --help ``` ## Persistence @@ -172,7 +172,7 @@ To upgrade to newer releases: 1. Download the updated Docker image: ```bash - docker pull digitallumberjack/gitlab-ci-multi-runner:1.9.0 + docker pull digitallumberjack/gitlab-ci-multi-runner:1.10.2 ``` 2. Stop the currently running image: @@ -192,7 +192,7 @@ To upgrade to newer releases: ```bash docker run -name gitlab-ci-multi-runner -d \ [OPTIONS] \ - digitallumberjack/gitlab-ci-multi-runner:1.9.0 + digitallumberjack/gitlab-ci-multi-runner:1.10.2 ``` ## Shell Access diff --git a/VERSION b/VERSION index f8e233b..5ad2491 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.9.0 +1.10.2 diff --git a/docker-compose.yml b/docker-compose.yml index 6c69517..7697c53 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ GitlabCIMultiRunner: - image: digitallumberjack/gitlab-ci-multi-runner:1.9.0 + image: digitallumberjack/gitlab-ci-multi-runner:1.10.2 volumes: - /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data environment: From 9947cf3211babdc4ac88043244721321f8ad12bb Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Sun, 5 Feb 2017 11:28:52 +0100 Subject: [PATCH 14/21] rollback to sameersbn/ubuntu:14.04.20170110 base image --- Dockerfile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 60056f2..1772165 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,6 @@ -FROM ubuntu:xenial +FROM sameersbn/ubuntu:14.04.20170110 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.10.2 \ GITLAB_CI_MULTI_RUNNER_USER=gitlab_ci_multi_runner \ GITLAB_CI_MULTI_RUNNER_HOME_DIR="/home/gitlab_ci_multi_runner" @@ -37,8 +30,6 @@ RUN wget -O /usr/local/bin/gitlab-ci-multi-runner \ COPY entrypoint.sh /sbin/entrypoint.sh RUN chmod 755 /sbin/entrypoint.sh -RUN rm -rf /var/lib/apt/lists/* - VOLUME ["${GITLAB_CI_MULTI_RUNNER_DATA_DIR}"] WORKDIR "${GITLAB_CI_MULTI_RUNNER_HOME_DIR}" ENTRYPOINT ["/sbin/entrypoint.sh"] From 3570012a08ca1b139ae0c115cf6567b8dce7b3e9 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Sun, 5 Feb 2017 11:30:55 +0100 Subject: [PATCH 15/21] bumped to gitlab runner v1.10.4 --- Changelog.md | 3 +++ Dockerfile | 2 +- README.md | 16 ++++++++-------- VERSION | 2 +- docker-compose.yml | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Changelog.md b/Changelog.md index 638d7c2..e912c68 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +**1.10.4** + - gitlab-ci-multi-runner: upgrade to 1.10.4 + **1.10.2** - gitlab-ci-multi-runner: upgrade to 1.10.2 diff --git a/Dockerfile b/Dockerfile index 1772165..2981691 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM sameersbn/ubuntu:14.04.20170110 MAINTAINER sameer@damagehead.com -ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.10.2 \ +ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.10.4 \ 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" diff --git a/README.md b/README.md index 211634a..0857cbf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Docker Repository on Quay.io](https://quay.io/repository/digitallumberjack/gitlab-ci-multi-runner/status "Docker Repository on Quay.io")](https://quay.io/repository/digitallumberjack/gitlab-ci-multi-runner) -# digitallumberjack/gitlab-ci-multi-runner:1.10.2 +# digitallumberjack/gitlab-ci-multi-runner:1.10.4 - [Introduction](#introduction) - [Contributing](#contributing) @@ -51,7 +51,7 @@ Automated builds of the image are available on [Dockerhub](https://hub.docker.co > **Note**: Builds are also available on [Quay.io](https://quay.io/repository/digitallumberjack/gitlab-ci-multi-runner) ```bash -docker pull digitallumberjack/gitlab-ci-multi-runner:1.10.2 +docker pull digitallumberjack/gitlab-ci-multi-runner:1.10.4 ``` Alternatively you can build the image yourself. @@ -71,7 +71,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=shell' \ - digitallumberjack/gitlab-ci-multi-runner:1.10.2 + digitallumberjack/gitlab-ci-multi-runner:1.10.4 ``` *Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)* @@ -92,7 +92,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=docker' \ --env='RUNNER_DOCKER_IMAGE=docker:latest' --env='RUNNER_DOCKER_MODE=socket' - digitallumberjack/gitlab-ci-multi-runner:1.10.2 + digitallumberjack/gitlab-ci-multi-runner:1.10.4 ``` Start the docker runner in dind mode : @@ -103,7 +103,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=docker' \ --env='RUNNER_DOCKER_IMAGE=docker:latest' --env='RUNNER_DOCKER_MODE=dind' - digitallumberjack/gitlab-ci-multi-runner:1.10.2 + digitallumberjack/gitlab-ci-multi-runner:1.10.4 ``` 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`. @@ -124,7 +124,7 @@ You can customize the launch command by specifying arguments to `gitlab-ci-multi ```bash docker run --name gitlab-ci-multi-runner -it --rm \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ - digitallumberjack/gitlab-ci-multi-runner:1.10.2 --help + digitallumberjack/gitlab-ci-multi-runner:1.10.4 --help ``` ## Persistence @@ -172,7 +172,7 @@ To upgrade to newer releases: 1. Download the updated Docker image: ```bash - docker pull digitallumberjack/gitlab-ci-multi-runner:1.10.2 + docker pull digitallumberjack/gitlab-ci-multi-runner:1.10.4 ``` 2. Stop the currently running image: @@ -192,7 +192,7 @@ To upgrade to newer releases: ```bash docker run -name gitlab-ci-multi-runner -d \ [OPTIONS] \ - digitallumberjack/gitlab-ci-multi-runner:1.10.2 + digitallumberjack/gitlab-ci-multi-runner:1.10.4 ``` ## Shell Access diff --git a/VERSION b/VERSION index 5ad2491..18b3114 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.10.2 +1.10.4 diff --git a/docker-compose.yml b/docker-compose.yml index 7697c53..7d8639d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ GitlabCIMultiRunner: - image: digitallumberjack/gitlab-ci-multi-runner:1.10.2 + image: digitallumberjack/gitlab-ci-multi-runner:1.10.4 volumes: - /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data environment: From fd83ccfd006f82bbad629280c92ffefaf0d456a0 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Sun, 5 Feb 2017 11:39:48 +0100 Subject: [PATCH 16/21] restored origin image name --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 0857cbf..c579bcb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[![Docker Repository on Quay.io](https://quay.io/repository/digitallumberjack/gitlab-ci-multi-runner/status "Docker Repository on Quay.io")](https://quay.io/repository/digitallumberjack/gitlab-ci-multi-runner) +[![Docker Repository on Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner/status "Docker Repository on Quay.io")](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) -# digitallumberjack/gitlab-ci-multi-runner:1.10.4 +# sameersbn/gitlab-ci-multi-runner:1.10.4 - [Introduction](#introduction) - [Contributing](#contributing) @@ -46,18 +46,18 @@ If the above recommendations do not help then [report your issue](../../issues/n ## Installation -Automated builds of the image are available on [Dockerhub](https://hub.docker.com/r/digitallumberjack/gitlab-ci-multi-runner) and is the recommended method of installation. +Automated builds of the image are available on [Dockerhub](https://hub.docker.com/r/sameersbn/gitlab-ci-multi-runner) and is the recommended method of installation. -> **Note**: Builds are also available on [Quay.io](https://quay.io/repository/digitallumberjack/gitlab-ci-multi-runner) +> **Note**: Builds are also available on [Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) ```bash -docker pull digitallumberjack/gitlab-ci-multi-runner:1.10.4 +docker pull sameersbn/gitlab-ci-multi-runner:1.10.4 ``` Alternatively you can build the image yourself. ```bash -docker build -t digitallumberjack/gitlab-ci-multi-runner github.com/digitallumberjack/docker-gitlab-ci-multi-runner +docker build -t sameersbn/gitlab-ci-multi-runner github.com/sameersbn/docker-gitlab-ci-multi-runner ``` ## Quickstart @@ -71,7 +71,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=shell' \ - digitallumberjack/gitlab-ci-multi-runner:1.10.4 + sameersbn/gitlab-ci-multi-runner:1.10.4 ``` *Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)* @@ -92,7 +92,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=docker' \ --env='RUNNER_DOCKER_IMAGE=docker:latest' --env='RUNNER_DOCKER_MODE=socket' - digitallumberjack/gitlab-ci-multi-runner:1.10.4 + sameersbn/gitlab-ci-multi-runner:1.10.4 ``` Start the docker runner in dind mode : @@ -103,7 +103,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=docker' \ --env='RUNNER_DOCKER_IMAGE=docker:latest' --env='RUNNER_DOCKER_MODE=dind' - digitallumberjack/gitlab-ci-multi-runner:1.10.4 + sameersbn/gitlab-ci-multi-runner:1.10.4 ``` 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`. @@ -124,7 +124,7 @@ You can customize the launch command by specifying arguments to `gitlab-ci-multi ```bash docker run --name gitlab-ci-multi-runner -it --rm \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ - digitallumberjack/gitlab-ci-multi-runner:1.10.4 --help + sameersbn/gitlab-ci-multi-runner:1.10.4 --help ``` ## Persistence @@ -172,7 +172,7 @@ To upgrade to newer releases: 1. Download the updated Docker image: ```bash - docker pull digitallumberjack/gitlab-ci-multi-runner:1.10.4 + docker pull sameersbn/gitlab-ci-multi-runner:1.10.4 ``` 2. Stop the currently running image: @@ -192,7 +192,7 @@ To upgrade to newer releases: ```bash docker run -name gitlab-ci-multi-runner -d \ [OPTIONS] \ - digitallumberjack/gitlab-ci-multi-runner:1.10.4 + sameersbn/gitlab-ci-multi-runner:1.10.4 ``` ## Shell Access From e3a7ab658683a8df103b7d8afb7a12c3b29fe3e3 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Sun, 5 Feb 2017 12:22:03 +0100 Subject: [PATCH 17/21] fixed package installation --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2981691..d6be89d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,12 @@ 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 \ +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E1DD270288B4E6030699E45FA1715D88E1DF1F24 \ + && echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu trusty main" >> /etc/apt/sources.list \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y \ + git-core openssh-client curl libapparmor1 \ + && 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 \ && adduser --disabled-login --gecos 'GitLab CI Runner' ${GITLAB_CI_MULTI_RUNNER_USER} \ From 71fbf3d3471a9f315891b14782d1611a8ac43f76 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Sun, 5 Feb 2017 13:02:20 +0100 Subject: [PATCH 18/21] added RUNNER_AUTOUNREGISTER variable to unregister the runner on stop --- Dockerfile | 1 + README.md | 17 +++++++++++++++++ entrypoint.sh | 6 ++++++ 3 files changed, 24 insertions(+) diff --git a/Dockerfile b/Dockerfile index d6be89d..7e4a5b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,7 @@ ENV RUNNER_DOCKER_PRIVATE_REGISTRY_URL='' ENV RUNNER_DOCKER_PRIVATE_REGISTRY_TOKEN='' ENV RUNNER_DOCKER_ADDITIONAL_VOLUME='' ENV RUNNER_OUTPUT_LIMIT='4096' +ENV RUNNER_AUTOUNREGISTER='false' RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E1DD270288B4E6030699E45FA1715D88E1DF1F24 \ && echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu trusty main" >> /etc/apt/sources.list \ diff --git a/README.md b/README.md index c579bcb..9986d1d 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,23 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ Update the values of `CI_SERVER_URL`, `RUNNER_TOKEN` and `RUNNER_DESCRIPTION` in the above command. If these enviroment variables are not specified, you will be prompted to enter these details interactively on first run. +## Available variables + +You can customise the runner with the following env variables: +- CA_CERTIFICATES_PATH: the path to your certificate +- RUNNER_CONCURRENT: the number of concurrent job the runner can start +- CI_SERVER_URL: your server URL (suffixed by /ci) +- RUNNER_TOKEN: the runner token corresponding to your project +- RUNNER_EXECUTOR: the executor to start +- RUNNER_DESCRIPTION: the description of the runner, displayed in gitlab ui +- RUNNER_DOCKER_IMAGE: the default image to run when starting a build +- RUNNER_DOCKER_MODE: the docker mode to use, socket or dind +- RUNNER_DOCKER_PRIVATE_REGISTRY_URL: url of private registry the runner should access +- RUNNER_DOCKER_PRIVATE_REGISTRY_TOKEN: token of private registry the runner should access +- RUNNER_DOCKER_ADDITIONAL_VOLUME: additionals volumes to share between host and jobs +- RUNNER_OUTPUT_LIMIT: output limit in KB that a build can produce +- RUNNER_AUTOUNREGISTER: auto unregister the runner when the container stops + ## Using docker executor You can use the docker executor by using `RUNNER_EXECUTOR=docker`. You must provide a docker image to use in `RUNNER_DOCKER_IMAGE` (e.g. docker:latest) diff --git a/entrypoint.sh b/entrypoint.sh index c447eb8..3a50c3e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -105,6 +105,12 @@ if [[ -z ${1} ]]; then --exec $(which gitlab-ci-multi-runner) -- run \ --working-directory ${GITLAB_CI_MULTI_RUNNER_DATA_DIR} \ --config ${GITLAB_CI_MULTI_RUNNER_DATA_DIR}/config.toml ${EXTRA_ARGS} + echo "Stopping runner" + if [[ "${RUNNER_AUTOUNREGISTER}" == "true" ]];then + echo "Unregistering runner from ${CI_SERVER_URL}" + sudo -HEu ${GITLAB_CI_MULTI_RUNNER_USER} \ + gitlab-ci-multi-runner unregister --url ${CI_SERVER_URL} --token $(grep token ${GITLAB_CI_MULTI_RUNNER_DATA_DIR}/config.toml | awk '{print $3}' | tr -d '"') + fi else exec "$@" fi From 6c55ae80a8ad38ecdef59404121e44fb5504e50e Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Sun, 26 Feb 2017 11:39:53 +0100 Subject: [PATCH 19/21] bumped to 1.11.0 --- Changelog.md | 6 ++++++ Dockerfile | 2 +- README.md | 16 ++++++++-------- VERSION | 2 +- docker-compose.yml | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Changelog.md b/Changelog.md index e912c68..b003248 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,11 @@ # Changelog +**1.11.0** + - added RUNNER_AUTOUNREGISTER option + +**1.10.4-2** + - added RUNNER_AUTOUNREGISTER option + **1.10.4** - gitlab-ci-multi-runner: upgrade to 1.10.4 diff --git a/Dockerfile b/Dockerfile index 7e4a5b4..6801175 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM sameersbn/ubuntu:14.04.20170110 MAINTAINER sameer@damagehead.com -ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.10.4 \ +ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.11.0 \ 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" diff --git a/README.md b/README.md index 9986d1d..4227a9b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Docker Repository on Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner/status "Docker Repository on Quay.io")](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) -# sameersbn/gitlab-ci-multi-runner:1.10.4 +# sameersbn/gitlab-ci-multi-runner:1.11.0 - [Introduction](#introduction) - [Contributing](#contributing) @@ -51,7 +51,7 @@ Automated builds of the image are available on [Dockerhub](https://hub.docker.co > **Note**: Builds are also available on [Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) ```bash -docker pull sameersbn/gitlab-ci-multi-runner:1.10.4 +docker pull sameersbn/gitlab-ci-multi-runner:1.11.0 ``` Alternatively you can build the image yourself. @@ -71,7 +71,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=shell' \ - sameersbn/gitlab-ci-multi-runner:1.10.4 + sameersbn/gitlab-ci-multi-runner:1.11.0 ``` *Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)* @@ -109,7 +109,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=docker' \ --env='RUNNER_DOCKER_IMAGE=docker:latest' --env='RUNNER_DOCKER_MODE=socket' - sameersbn/gitlab-ci-multi-runner:1.10.4 + sameersbn/gitlab-ci-multi-runner:1.11.0 ``` Start the docker runner in dind mode : @@ -120,7 +120,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=docker' \ --env='RUNNER_DOCKER_IMAGE=docker:latest' --env='RUNNER_DOCKER_MODE=dind' - sameersbn/gitlab-ci-multi-runner:1.10.4 + sameersbn/gitlab-ci-multi-runner:1.11.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`. @@ -141,7 +141,7 @@ You can customize the launch command by specifying arguments to `gitlab-ci-multi ```bash docker run --name gitlab-ci-multi-runner -it --rm \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ - sameersbn/gitlab-ci-multi-runner:1.10.4 --help + sameersbn/gitlab-ci-multi-runner:1.11.0 --help ``` ## Persistence @@ -189,7 +189,7 @@ To upgrade to newer releases: 1. Download the updated Docker image: ```bash - docker pull sameersbn/gitlab-ci-multi-runner:1.10.4 + docker pull sameersbn/gitlab-ci-multi-runner:1.11.0 ``` 2. Stop the currently running image: @@ -209,7 +209,7 @@ To upgrade to newer releases: ```bash docker run -name gitlab-ci-multi-runner -d \ [OPTIONS] \ - sameersbn/gitlab-ci-multi-runner:1.10.4 + sameersbn/gitlab-ci-multi-runner:1.11.0 ``` ## Shell Access diff --git a/VERSION b/VERSION index 18b3114..1cac385 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.10.4 +1.11.0 diff --git a/docker-compose.yml b/docker-compose.yml index 5c5941c..ac6a1ed 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ GitlabCIMultiRunner: - image: sameersbn/gitlab-ci-multi-runner:1.10.4 + image: sameersbn/gitlab-ci-multi-runner:1.11.0 volumes: - /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data environment: From 80abfc545e916e851b9beb7caf614e757c105424 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Wed, 19 Apr 2017 10:42:50 +0200 Subject: [PATCH 20/21] bumped to runner v1.11.2 --- Changelog.md | 3 +++ Dockerfile | 4 ++-- README.md | 16 ++++++++-------- VERSION | 2 +- docker-compose.yml | 2 +- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Changelog.md b/Changelog.md index b003248..0077fad 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +**1.11.2** + - bumped to runner 1.11.2 and sameersbn/ubuntu:14.04.20170228 + **1.11.0** - added RUNNER_AUTOUNREGISTER option diff --git a/Dockerfile b/Dockerfile index 6801175..a9df412 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM sameersbn/ubuntu:14.04.20170110 +FROM sameersbn/ubuntu:14.04.20170228 MAINTAINER sameer@damagehead.com -ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.11.0 \ +ENV GITLAB_CI_MULTI_RUNNER_VERSION=1.11.2 \ 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" diff --git a/README.md b/README.md index 4227a9b..5188943 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Docker Repository on Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner/status "Docker Repository on Quay.io")](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) -# sameersbn/gitlab-ci-multi-runner:1.11.0 +# sameersbn/gitlab-ci-multi-runner:1.11.2 - [Introduction](#introduction) - [Contributing](#contributing) @@ -51,7 +51,7 @@ Automated builds of the image are available on [Dockerhub](https://hub.docker.co > **Note**: Builds are also available on [Quay.io](https://quay.io/repository/sameersbn/gitlab-ci-multi-runner) ```bash -docker pull sameersbn/gitlab-ci-multi-runner:1.11.0 +docker pull sameersbn/gitlab-ci-multi-runner:1.11.2 ``` Alternatively you can build the image yourself. @@ -71,7 +71,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=shell' \ - sameersbn/gitlab-ci-multi-runner:1.11.0 + sameersbn/gitlab-ci-multi-runner:1.11.2 ``` *Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)* @@ -109,7 +109,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=docker' \ --env='RUNNER_DOCKER_IMAGE=docker:latest' --env='RUNNER_DOCKER_MODE=socket' - sameersbn/gitlab-ci-multi-runner:1.11.0 + sameersbn/gitlab-ci-multi-runner:1.11.2 ``` Start the docker runner in dind mode : @@ -120,7 +120,7 @@ docker run --name gitlab-ci-multi-runner -d --restart=always \ --env='CI_SERVER_URL=http://git.example.com/ci' --env='RUNNER_TOKEN=xxxxxxxxx' \ --env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=docker' \ --env='RUNNER_DOCKER_IMAGE=docker:latest' --env='RUNNER_DOCKER_MODE=dind' - sameersbn/gitlab-ci-multi-runner:1.11.0 + sameersbn/gitlab-ci-multi-runner:1.11.2 ``` 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`. @@ -141,7 +141,7 @@ You can customize the launch command by specifying arguments to `gitlab-ci-multi ```bash docker run --name gitlab-ci-multi-runner -it --rm \ --volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \ - sameersbn/gitlab-ci-multi-runner:1.11.0 --help + sameersbn/gitlab-ci-multi-runner:1.11.2 --help ``` ## Persistence @@ -189,7 +189,7 @@ To upgrade to newer releases: 1. Download the updated Docker image: ```bash - docker pull sameersbn/gitlab-ci-multi-runner:1.11.0 + docker pull sameersbn/gitlab-ci-multi-runner:1.11.2 ``` 2. Stop the currently running image: @@ -209,7 +209,7 @@ To upgrade to newer releases: ```bash docker run -name gitlab-ci-multi-runner -d \ [OPTIONS] \ - sameersbn/gitlab-ci-multi-runner:1.11.0 + sameersbn/gitlab-ci-multi-runner:1.11.2 ``` ## Shell Access diff --git a/VERSION b/VERSION index 1cac385..ca71766 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.0 +1.11.2 diff --git a/docker-compose.yml b/docker-compose.yml index ac6a1ed..8eda950 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ GitlabCIMultiRunner: - image: sameersbn/gitlab-ci-multi-runner:1.11.0 + image: sameersbn/gitlab-ci-multi-runner:1.11.2 volumes: - /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data environment: From d050d92c6602e2fbddb903a3abdd540c3456d1ea Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Mon, 3 Jul 2017 06:50:49 +0200 Subject: [PATCH 21/21] fixed spelling on concurrent parameter --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 3a50c3e..760e234 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -77,7 +77,7 @@ configure_ci_runner() { gitlab-ci-multi-runner register --config ${GITLAB_CI_MULTI_RUNNER_DATA_DIR}/config.toml fi if [[ -n ${RUNNER_CONCURRENT} ]];then - sed -i "s/concurrent = .*/concurent = ${RUNNER_CONCURRENT}/" ${GITLAB_CI_MULTI_RUNNER_DATA_DIR}/config.toml + sed -i "s/concurrent = .*/concurrent = ${RUNNER_CONCURRENT}/" ${GITLAB_CI_MULTI_RUNNER_DATA_DIR}/config.toml fi fi }