diff --git a/templates/gitlab-multi-runner/3/docker-compose.yml.tpl b/templates/gitlab-multi-runner/3/docker-compose.yml.tpl new file mode 100644 index 0000000..8c43e85 --- /dev/null +++ b/templates/gitlab-multi-runner/3/docker-compose.yml.tpl @@ -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}} diff --git a/templates/gitlab-multi-runner/3/rancher-compose.yml b/templates/gitlab-multi-runner/3/rancher-compose.yml new file mode 100644 index 0000000..9fe7370 --- /dev/null +++ b/templates/gitlab-multi-runner/3/rancher-compose.yml @@ -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 diff --git a/templates/gitlab-multi-runner/config.yml b/templates/gitlab-multi-runner/config.yml index 4686092..41687c1 100644 --- a/templates/gitlab-multi-runner/config.yml +++ b/templates/gitlab-multi-runner/config.yml @@ -1,5 +1,5 @@ name: gitlab-multi-runner description: | a Gitlab pipelines multi-runner, that will spawn privates runners in your infra. -version: 9.4.2 +version: 10.3.0 category: Continuous Integration