summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJeoffrey Bauvin <jeoffrey.bauvin.ext@boursorama.fr>2015-10-27 09:27:30 +0100
committerJeoffrey Bauvin <jeoffrey.bauvin.ext@boursorama.fr>2015-10-27 09:27:30 +0100
commita89c460e0f630d778513a3b07a33f150b79d2aae (patch)
treecbadc6732eff0914a8a8bf24646ac8e3789572fd /templates
parentf6da3a0d9d3604f62021ef0936e3f4f12649d8c4 (diff)
Add runner
Diffstat (limited to 'templates')
-rw-r--r--templates/fragment_header_config.toml.erb3
-rw-r--r--templates/fragment_runner_config.toml.erb95
2 files changed, 98 insertions, 0 deletions
diff --git a/templates/fragment_header_config.toml.erb b/templates/fragment_header_config.toml.erb
new file mode 100644
index 0000000..73309a9
--- /dev/null
+++ b/templates/fragment_header_config.toml.erb
@@ -0,0 +1,3 @@
+# This file is managed by Puppet
+
+concurrent = <%= @concurrent %>
diff --git a/templates/fragment_runner_config.toml.erb b/templates/fragment_runner_config.toml.erb
new file mode 100644
index 0000000..a9c3ca3
--- /dev/null
+++ b/templates/fragment_runner_config.toml.erb
@@ -0,0 +1,95 @@
+
+[[runners]]
+ name = "<%= @name %>"
+ executor = "<%= @executor %>"
+<% if @url -%>
+ url = "<%= @url %>"
+<% end -%>
+<% if @token -%>
+ token = "<%= @token %>"
+<% end -%>
+<% if @limit -%>
+ limit = <%= @limit %>
+<% end -%>
+<% if @shell -%>
+ shell = "<%= @shell %>"
+<% end -%>
+<% if @builds_dir -%>
+ builds_dir = "<%= @builds_dir %>"
+<% end -%>
+<% if @environment -%>
+ environment = <%= @environment %>
+<% end -%>
+<% if @disable_verbose -%>
+ disable_verbose = <%= @disable_verbose %>
+<% end -%>
+<% if @output_limit -%>
+ output_limit = <%= @output_limit %>
+<% end -%>
+<% if executor == 'docker' -%>
+ [runners.docker]
+ <%- if @docker_params['host'] -%>
+ host = "<%= @docker_params['host'] %>"
+ <%- end -%>
+ <%- if @docker_params['hostname'] -%>
+ hostname = "<%= @docker_params['hostname'] %>"
+ <%- end -%>
+ <%- if @docker_params['tls_cert_path'] -%>
+ tls_cert_path = "<%= @docker_params['tls_cert_path'] %>"
+ <%- end -%>
+ <%- if @docker_params['disable_cache'] -%>
+ disable_cache = <%= @disable_cache %>
+ <%- end -%>
+ <%- if @docker_params['wait_for_services_timeout'] -%>
+ wait_for_services_timeout = <%= @wait_for_services_timeout %>
+ <%- end -%>
+ <%- if @docker_params['cache_dir'] -%>
+ cache_dir = "<%= @cache_dir %>"
+ <%- end -%>
+ <%- if @docker_params['extra_hosts'] -%>
+ extra_hosts = <%= @extra_hosts %>
+ <%- end -%>
+ <%- if @docker_params['links'] -%>
+ links = <%= @links %>
+ <%- end -%>
+ <%- if @docker_params['services'] -%>
+ services = <%= @services %>
+ <%- end -%>
+ <%- if @docker_params['image'] -%>
+ image = "<%= @docker_params['image'] %>"
+ <%- end -%>
+ allowed_images = <%= @docker_params['allowed_images'] %>
+ allowed_services = <%= @docker_params['allowed_services'] %>
+ privileged = <%= @docker_params['privileged'] %>
+ volumes = <%= @docker_params['volumes'] %>
+<% end -%>
+<% if executor == 'parallels' -%>
+ [runners.parallels]
+ <%- if @parallels_params['base_name'] -%>
+ base_name = "<%= @docker_params['base_name'] %>"
+ <%- end -%>
+ <%- if @parallels_params['template_name'] -%>
+ template_name = "<%= @parallels_params['template_name'] %>"
+ <%- end -%>
+ <%- if @parallels_params['disable_snapshots'] -%>
+ disable_snapshots = <%= @parallels_params['disable_snapshots'] %>
+ <%- end -%>
+<%- end -%>
+<% if executor == 'ssh' -%>
+ [runners.ssh]
+ <%- if @ssh_params['host'] -%>
+ host = "<%= @ssh_params['host'] %>"
+ <%- end -%>
+ <%- if @ssh_params['port'] -%>
+ port = "<%= @ssh_params['port'] %>"
+ <%- end -%>
+ <%- if @ssh_params['user'] -%>
+ user = "<%= @ssh_params['user'] %>"
+ <%- end -%>
+ <%- if @ssh_params['password'] -%>
+ password = "<%= @ssh_params['password'] %>"
+ <%- end -%>
+ <%- if @ssh_params['identity_file'] -%>
+ identity_file = "<%= @ssh_params['identity_file'] %>"
+ <%- end -%>
+<% end -%> \ No newline at end of file