summaryrefslogtreecommitdiff
path: root/templates/fragment_runner_config.toml.erb
blob: 056e157337fe5609a8aa1257413f7630920fb8c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106

[[runners]]
<% if @name -%>
  name = "<%= @name %>"
<% end -%>
  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 @tls_skip_verify -%>
  tls_skip_verify = <%= @tls_skip_verify %>
<% end -%>
<% if @tls_ca_file -%>
  tls_ca_file = "<%= @tls_ca_file %>"
<% 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 = "<%= @docker_params['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 -%>
  <%- if @docker_params['sysctls'] -%>
    sysctls = "<%= @docker_params['sysctls'] %>"
  <%- 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 -%>