Skip to content

Commit 472585f

Browse files
committed
Add support to retain 200 max build logs only
1 parent a1b8ab2 commit 472585f

File tree

6 files changed

+24
-1
lines changed

6 files changed

+24
-1
lines changed

terraform-modules/concourse/app/concourse.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ data "helm_template" "concourse" {
6363
value = var.concourse_max_days_to_retain_build_logs
6464
}
6565
}
66+
67+
dynamic "set" {
68+
for_each = var.concourse_max_build_logs_to_retain != null ? [1] : []
69+
content {
70+
name = "concourse.web.maxBuildLogsToRetain"
71+
value = var.concourse_max_build_logs_to_retain
72+
}
73+
}
6674
}
6775

6876
data "carvel_ytt" "concourse_app" {

terraform-modules/concourse/app/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,10 @@ variable "concourse_max_days_to_retain_build_logs" {
2121
description = "Optional: Max days to retain build logs in Concourse"
2222
type = number
2323
default = null
24+
}
25+
26+
variable "concourse_max_build_logs_to_retain" {
27+
description = "Optional: Max build logs to retain in Concourse"
28+
type = number
29+
default = null
2430
}

terragrunt/concourse-wg-ci-test/app/terragrunt.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ inputs = {
5353
concourse_github_mainTeamUser = local.config.concourse_github_mainTeamUser
5454
concourse_container_placement_strategy = local.config.concourse_container_placement_strategy
5555
concourse_max_days_to_retain_build_logs = local.config.concourse_max_days_to_retain_build_logs
56+
concourse_max_build_logs_to_retain = local.config.concourse_max_build_logs_to_retain
5657
}

terragrunt/concourse-wg-ci-test/config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ concourse_container_placement_strategy: "volume-locality"
2626
# Optional: Set the maximum number of days to retain Concourse build logs.
2727
# If not set, the default Concourse is configured to feel very snappy!.
2828
concourse_max_days_to_retain_build_logs: 30
29+
# Optional: Set the maximum number of build logs to retain.
30+
# If not set or set to 0, the default Concourse is configured to feel very snappy!.
31+
concourse_max_build_logs_to_retain: 200
32+
2933
# Concourse helm chart
3034
concourse_helm_version: "18.1.1"
3135

terragrunt/concourse-wg-ci/app/terragrunt.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ inputs = {
5353
concourse_github_mainTeamUser = local.config.concourse_github_mainTeamUser
5454
concourse_container_placement_strategy = local.config.concourse_container_placement_strategy
5555
concourse_max_days_to_retain_build_logs = local.config.concourse_max_days_to_retain_build_logs
56+
concourse_max_build_logs_to_retain = local.config.concourse_max_build_logs_to_retain
5657
}

terragrunt/concourse-wg-ci/config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ concourse_github_mainTeamUser: ""
2424
# The cloud controller unit tests cause a high system load on workers, so place them on workers with few containers
2525
concourse_container_placement_strategy: "fewest-build-containers"
2626
# Optional: Set the maximum number of days to retain Concourse build logs.
27-
# If not set, the default Concourse is configured to feel very snappy!.
27+
# If not set or set to 0, the default Concourse is configured to feel very snappy!.
2828
concourse_max_days_to_retain_build_logs: 30
29+
# Optional: Set the maximum number of build logs to retain.
30+
# If not set or set to 0, the default Concourse is configured to feel very snappy!.
31+
concourse_max_build_logs_to_retain: 200
2932

3033
# Concourse helm chart
3134
concourse_helm_version: "18.1.1"

0 commit comments

Comments
 (0)