# Infrastructure # Ansible instructions to deploy the infrastructure # Copyright (C) 2019-2020 Christoph (Sheogorath) Kern # Copyright (C) 2020 Saibotk # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . concurrent = {{ gitlab_runner_concurrent }} check_interval = {{ gitlab_runner_check_interval }} {% for gitlabrunner in gitlab_runner_runners %} [[runners]] name = "{{ gitlabrunner.name }}" limit = {{ gitlabrunner.limit | default(1) }} url = "{{ gitlabrunner.gitlab_url }}" token = "{{ gitlabrunner.gitlab_token }}" executor = "{{ gitlabrunner.executor }}" {% if gitlabrunner.executor == "docker" or gitlabrunner.executor == "docker+machine" %} [runners.docker] image = "{{ gitlabrunner.docker_image | default("docker.io/library/docker:stable") }}" privileged = {{ gitlabrunner.docker_privileged | bool | lower }} volumes = [ "/cache", {% if gitlabrunner.docker_mount_socket %} "/var/run/docker.sock:/var/run/docker.sock" {% endif %} ] {% endif %} {% if gitlabrunner.executor == "docker+machine" %} [runners.machine] IdleCount = {{ gitlabrunner.machine_idle_count }} IdleTime = {{ gitlabrunner.machine_idle_time }} MaxBuilds = {{ gitlabrunner.machine_max_builds }} MachineDriver = "{{ gitlabrunner.machine_driver }}" MachineName = "{{ gitlabrunner.machine_name }}" MachineOptions = [ {% for key, value in gitlabrunner.machine_options.items() %} "{{ key }}={{ value }}", {% endfor %} ] {% endif %} [runners.cache] {% if gitlabrunner.cache_s3 is defined %} Type = "s3" Shared = false [runners.cache.s3] ServerAddress = "{{ gitlabrunner.cache_s3.server }}" AccessKey = "{{ gitlabrunner.cache_s3.access_key }}" SecretKey = "{{ gitlabrunner.cache_s3.secret_key }}" BucketName = "{{ gitlabrunner.cache_s3.bucket }}" Insecure = false {% endif %} {% endfor %}