diff --git a/templates/gitlab-multi-runner/0/docker-compose.yml b/templates/gitlab-multi-runner/0/docker-compose.yml new file mode 100644 index 0000000..b0b3c35 --- /dev/null +++ b/templates/gitlab-multi-runner/0/docker-compose.yml @@ -0,0 +1,44 @@ +version: '2' + +services: + + gitlab-runner-config: + image: gitlab/gitlab-runner:alpine + stdin_open: true + volumes: + - /etc/gitlab-runner/ + tty: true + command: + - register + - -n + - --url + - ${GITLAB_URL} + - --registration-token + - ${GITLAB_TOKEN} + - --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.pull_image: always + io.rancher.container.start_once: 'true' + + gitlab-runner: + image: gitlab/gitlab-runner:alpine + 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.container.pull_image: always + io.rancher.scheduler.global: 'true' diff --git a/templates/gitlab-multi-runner/0/rancher-compose.yml b/templates/gitlab-multi-runner/0/rancher-compose.yml new file mode 100644 index 0000000..e30fa9f --- /dev/null +++ b/templates/gitlab-multi-runner/0/rancher-compose.yml @@ -0,0 +1,30 @@ +version: '2' + +catalog: + name: "gitlab-multi-runner" + version: "0.1" + description: "a Gitlab pipelines multi-runner, that will spawn privates runners in your infra." + # minimum_rancher_version: + # 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 + +services: + gitlab-runner-config: + scale: 1 + start_on_create: true + gitlab-runner: + start_on_create: true \ No newline at end of file diff --git a/templates/gitlab-multi-runner/catalogIcon-gitlab-multi-runner.png b/templates/gitlab-multi-runner/catalogIcon-gitlab-multi-runner.png new file mode 100644 index 0000000..a629de7 Binary files /dev/null and b/templates/gitlab-multi-runner/catalogIcon-gitlab-multi-runner.png differ diff --git a/templates/gitlab-multi-runner/config.yml b/templates/gitlab-multi-runner/config.yml new file mode 100644 index 0000000..bad31a7 --- /dev/null +++ b/templates/gitlab-multi-runner/config.yml @@ -0,0 +1,5 @@ +name: gitlab-multi-runner +description: | + a Gitlab pipelines multi-runner, that will spawn privates runners in your infra. +version: 1 +category: Continuous Integration