You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat!: allow to set all docker options for the Executor (#511)
Adds a new variable `runners_docker_options` which holds all values for
the `[runners.docker]` section and makes the single variables
- `runners_image`
- `runners_privileged`
- `runners_disable_cache`
- `runners_additional_volumes`
- `runners_shm_size`
- `runners_docker_runtime`
- `runners_helper_image`
- `runners_pull_policy`
obsolete.
Yes, as the minimum Terraform version is 1.3.0 to support optional block
variables with defaults.
A migration script is provided to restructure the variables. See
`/migrations/migrate-to-7-0-0.sh`. Attention Mac users: The script will
not work out of the box as the `sed` implementation is different. Use a
Docker container with Alpine or Ubuntu to run the script.
```hcl
module "gitlab_ci_runner" {
...
runners_docker_options {
# set whatever is necessary
}
```
- [x] Use current configuration and ensure that the `config.toml`
remains unchanged
- [x] Set all new block variables and ensure that the `config.toml` is
valid (use `gitlab-runner verify)
- [x] Check that the default settings with Terraform 1.3 work as
expected
- [x] Verify all docker settings against the documentation to ensure
correct names
The runner starts in both cases and is available in Gitlab. No example
tested but used our active configuration at Hapag-Lloyd.
---------
Co-authored-by: Tyrone Meijn <[email protected]>
description="Overrides the default helper image used to clone repos and upload artifacts, will be used in the runner config.toml"
259
-
type=string
260
-
default=""
261
-
}
230
+
type=object({
231
+
allowed_images =optional(list(string))
232
+
allowed_pull_policies =optional(list(string))
233
+
allowed_services =optional(list(string))
234
+
cache_dir =optional(string)
235
+
cap_add =optional(list(string))
236
+
cap_drop =optional(list(string))
237
+
container_labels =optional(list(string))
238
+
cpuset_cpus =optional(string)
239
+
cpu_shares =optional(number)
240
+
cpus =optional(string)
241
+
devices =optional(list(string))
242
+
device_cgroup_rules =optional(list(string))
243
+
disable_cache =optional(bool, false)
244
+
disable_entrypoint_overwrite =optional(bool)
245
+
dns =optional(list(string))
246
+
dns_search =optional(list(string))
247
+
extra_hosts =optional(list(string))
248
+
gpus =optional(string)
249
+
helper_image =optional(string)
250
+
helper_image_flavor =optional(string)
251
+
host =optional(string)
252
+
hostname =optional(string)
253
+
image =optional(string, "docker:18.03.1-ce")
254
+
isolation =optional(string)
255
+
links =optional(list(string))
256
+
mac_address =optional(string)
257
+
memory =optional(string)
258
+
memory_swap =optional(string)
259
+
memory_reservation =optional(string)
260
+
network_mode =optional(string)
261
+
oom_kill_disable =optional(bool)
262
+
oom_score_adjust =optional(number)
263
+
privileged =optional(bool, true)
264
+
pull_policies =optional(list(string), ["always"])
265
+
runtime =optional(string)
266
+
security_opt =optional(list(string))
267
+
shm_size =optional(number, 0)
268
+
sysctls =optional(list(string))
269
+
tls_cert_path =optional(string)
270
+
tls_verify =optional(bool, false)
271
+
user =optional(string)
272
+
userns_mode =optional(string)
273
+
volumes =optional(list(string), ["/cache"])
274
+
volumes_from =optional(list(string))
275
+
volume_driver =optional(string)
276
+
wait_for_services_timeout =optional(number)
277
+
})
262
278
263
-
variable"runners_pull_policies" {
264
-
description="pull policies for the runners, will be used in the runner config.toml, for Gitlab Runner >= 13.8, see https://docs.gitlab.com/runner/executors/docker.html#using-multiple-pull-policies "
0 commit comments