Skip to content

Commit

Permalink
Try forEach for failOnMetricsChange {...}
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyKoltsov1997 committed Nov 16, 2022
1 parent c03128a commit 43bb67e
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions .teamcity/generated/ImageValidation.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 43bb67e

Please sign in to comment.