add gitlab-multi-runner 10.3.0

This commit is contained in:
Adriaan Wind 2017-12-28 18:44:14 +01:00
parent 3f131d44a4
commit 156a7341d6
3 changed files with 93 additions and 1 deletions

View File

@ -0,0 +1,47 @@
version: '2'
services:
gitlab-runner-config:
image: gitlab/gitlab-runner:alpine-v10.3.0
stdin_open: true
volumes:
- /etc/gitlab-runner/
tty: true
command:
- register
- -n
- --url
- ${GITLAB_URL}
- --registration-token
- ${GITLAB_TOKEN}
- --tag-list
- ${GITLAB_TAGS}
- --executor
- docker
- --description
- Rancher Docker Runner
- --docker-image
- docker:latest
- --docker-volumes
- /var/run/docker.sock:/var/run/docker.sock
- --docker-privileged
labels:
io.rancher.container.start_once: 'true'
gitlab-runner:
image: gitlab/gitlab-runner:alpine-v10.3.0
stdin_open: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
tty: true
volumes_from:
- gitlab-runner-config
command:
- run
labels:
io.rancher.sidekicks: gitlab-runner-config
io.rancher.scheduler.global: 'true'
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}

View File

@ -0,0 +1,45 @@
version: '2'
catalog:
name: "gitlab-multi-runner"
version: "10.3.0"
description: "a Gitlab pipelines multi-runner, that will spawn privates runners in your infra."
minimum_rancher_version: v1.5.0
# maximum_rancher_version:
# upgrade_from: # The previous versions that this template can be upgraded from
questions:
- variable: "GITLAB_URL"
label: "Gitlab Url"
description: "Url to your Gitlab CI endpoint"
type: "string"
default: "https://gitlab.com/ci"
required: true
- variable: "GITLAB_TOKEN"
label: "Gitlab Token"
description: "Token provided in you project settings"
type: "string"
default: "xxxxxxxxxxxxxxxxxxxx"
required: true
- variable: "GITLAB_TAGS"
label: "Gitlab Tags"
description: "Tags to apply"
type: "string"
default: "dev"
required: false
- variable: "host_label"
label: "Host with Label to deploy gitlab-runner on"
description: |
Host label to use as gitlab-runner 'value' tag.
Example: 'gitlab-runner=true'
type: "string"
default: ""
required: false
services:
gitlab-runner-config:
start_on_create: true
gitlab-runner:
start_on_create: true

View File

@ -1,5 +1,5 @@
name: gitlab-multi-runner name: gitlab-multi-runner
description: | description: |
a Gitlab pipelines multi-runner, that will spawn privates runners in your infra. a Gitlab pipelines multi-runner, that will spawn privates runners in your infra.
version: 9.4.2 version: 10.3.0
category: Continuous Integration category: Continuous Integration