Skip to content

Commit

Permalink
feat: Make disable_cache configurable (#324)
Browse files Browse the repository at this point in the history
* Make disable_cache configurable

* Fix incorrectly removed variable

* missing file in commit
  • Loading branch information
Pier-Luc Gagnon authored May 21, 2021
1 parent 793df79 commit d726cf4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ terraform destroy
| runners\_pre\_build\_script | Script to execute in the pipeline just before the build, will be used in the runner config.toml | `string` | `"\"\""` | no |
| runners\_pre\_clone\_script | Commands to be executed on the Runner before cloning the Git repository. this can be used to adjust the Git client configuration first, for example. | `string` | `"\"\""` | no |
| runners\_privileged | Runners will run in privileged mode, will be used in the runner config.toml | `bool` | `true` | no |
| runners\_disable\_cache | Runners will not use local cache, will be used in the runner config.toml | `bool` | `false` | no |
| runners\_pull\_policy | pull\_policy for the runners, will be used in the runner config.toml | `string` | `"always"` | no |
| runners\_request\_concurrency | Limit number of concurrent requests for new jobs from GitLab (default 1) | `number` | `1` | no |
| runners\_request\_spot\_instance | Whether or not to request spot instances via docker-machine | `bool` | `true` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ locals {
runners_concurrent = var.runners_concurrent
runners_image = var.runners_image
runners_privileged = var.runners_privileged
runners_disable_cache = var.runners_disable_cache
runners_docker_runtime = var.runners_docker_runtime
runners_helper_image = var.runners_helper_image
runners_shm_size = var.runners_shm_size
Expand Down
2 changes: 1 addition & 1 deletion template/runner-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ check_interval = 0
tls_verify = false
image = "${runners_image}"
privileged = ${runners_privileged}
disable_cache = false
disable_cache = ${runners_disable_cache}
volumes = ["/cache"${runners_additional_volumes}]
shm_size = ${runners_shm_size}
pull_policy = "${runners_pull_policy}"
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ variable "runners_privileged" {
default = true
}

variable "runners_disable_cache" {
description = "Runners will not use local cache, will be used in the runner config.toml"
type = bool
default = false
}

variable "runners_additional_volumes" {
description = "Additional volumes that will be used in the runner config.toml, e.g Docker socket"
type = list(any)
Expand Down

0 comments on commit d726cf4

Please sign in to comment.