From 43bb67e1e0b10e558078d4ff35666e28270fbfb3 Mon Sep 17 00:00:00 2001 From: AndreyKoltsov1997 Date: Wed, 16 Nov 2022 17:01:06 +0100 Subject: [PATCH] Try forEach for failOnMetricsChange {...} --- .teamcity/generated/ImageValidation.kts | 50 ++++++++++++------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.teamcity/generated/ImageValidation.kts b/.teamcity/generated/ImageValidation.kts index ad95c0904..7010e223c 100644 --- a/.teamcity/generated/ImageValidation.kts +++ b/.teamcity/generated/ImageValidation.kts @@ -59,35 +59,35 @@ object image_validation: BuildType( failureConditions { - failOnMetricChange { - // -- target metric -// param("metricKey", it.replace("%docker.deployRepository%", "").replace("2022.10-", "")) - param("metricKey", "SIZE-teamcity-agent:windowsservercore-1809") - - units = BuildFailureOnMetric.MetricUnit.PERCENTS - // -- 5% increase - threshold = 5 - comparison = BuildFailureOnMetric.MetricComparison.MORE - compareTo = build { - buildRule = lastSuccessful() - } - } - // fail in case statistics for any image changes for more than N percent -// images.forEach { -// failOnMetricChange { -// // -- target metric +// failOnMetricChange { +// // -- target metric //// param("metricKey", it.replace("%docker.deployRepository%", "").replace("2022.10-", "")) -// param("metricKey", it) +// param("metricKey", "SIZE-teamcity-agent:windowsservercore-1809") // -// units = BuildFailureOnMetric.MetricUnit.PERCENTS -// // -- 5% increase -// threshold = 5 -// comparison = BuildFailureOnMetric.MetricComparison.MORE -// compareTo = build { -// buildRule = lastSuccessful() -// } +// units = BuildFailureOnMetric.MetricUnit.PERCENTS +// // -- 5% increase +// threshold = 5 +// comparison = BuildFailureOnMetric.MetricComparison.MORE +// compareTo = build { +// buildRule = lastSuccessful() // } // } + // fail in case statistics for any image changes for more than N percent + images.forEach { + failOnMetricChange { + // -- target metric +// param("metricKey", it.replace("%docker.deployRepository%", "").replace("2022.10-", "")) + param("metricKey", it) + + units = BuildFailureOnMetric.MetricUnit.PERCENTS + // -- 5% increase + threshold = 5 + comparison = BuildFailureOnMetric.MetricComparison.MORE + compareTo = build { + buildRule = lastSuccessful() + } + } + } failOnText {