Always send to slack comparasion report with master + fix for higligted field
This commit is contained in:
@@ -116,7 +116,6 @@ open class RegressionsReporter : DefaultTask() {
|
|||||||
|
|
||||||
// Get previous build on branch.
|
// Get previous build on branch.
|
||||||
val builds = getBuild(previousBuildLocator(buildTypeId,branch), user, password)
|
val builds = getBuild(previousBuildLocator(buildTypeId,branch), user, password)
|
||||||
val previousBuildsExist = (JsonTreeParser.parse(builds) as JsonObject).getPrimitive("count").int != 0
|
|
||||||
|
|
||||||
// Get changes description.
|
// Get changes description.
|
||||||
val changesList = getCommits("id:$buildId", user, password)
|
val changesList = getCommits("id:$buildId", user, password)
|
||||||
@@ -126,16 +125,11 @@ open class RegressionsReporter : DefaultTask() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
println("defaul Branch: $defaultBranch")
|
|
||||||
|
|
||||||
// If branch differs from default and it's first build compare to master, otherwise compare to previous build on branch.
|
|
||||||
val compareToBranch = if (previousBuildsExist) branch else defaultBranch
|
|
||||||
|
|
||||||
// File name on bintray is the same as current.
|
// File name on bintray is the same as current.
|
||||||
val bintrayFileName = currentBenchmarksReportFile.substringAfterLast("/")
|
val bintrayFileName = currentBenchmarksReportFile.substringAfterLast("/")
|
||||||
|
|
||||||
// Get compare to build.
|
// Get compare to build.
|
||||||
val compareToBuild = getBuild(previousBuildLocator(buildTypeId, compareToBranch), user, password)
|
val compareToBuild = getBuild(previousBuildLocator(buildTypeId, defaultBranch), user, password)
|
||||||
val compareToBuildLink = getBuildProperty(compareToBuild,"webUrl")
|
val compareToBuildLink = getBuildProperty(compareToBuild,"webUrl")
|
||||||
val compareToBuildNumber = getBuildProperty(compareToBuild,"number")
|
val compareToBuildNumber = getBuildProperty(compareToBuild,"number")
|
||||||
val target = System.getProperty("os.name").replace("\\s".toRegex(), "")
|
val target = System.getProperty("os.name").replace("\\s".toRegex(), "")
|
||||||
|
|||||||
@@ -277,12 +277,13 @@ fun main(args: Array<String>) {
|
|||||||
autocompleteParameters["onSelect"] = { suggestion ->
|
autocompleteParameters["onSelect"] = { suggestion ->
|
||||||
if (suggestion.value != parameters["build"]) {
|
if (suggestion.value != parameters["build"]) {
|
||||||
val newLink = "http://${window.location.host}/?target=${parameters["target"]}&type=${parameters["type"]}" +
|
val newLink = "http://${window.location.host}/?target=${parameters["target"]}&type=${parameters["type"]}" +
|
||||||
"${if (suggestion.value.isEmpty()) "" else "&build=${suggestion.value}"}"
|
"${if ((suggestion.value as String).isEmpty()) "" else "&build=${suggestion.value}"}"
|
||||||
window.location.href = newLink
|
window.location.href = newLink
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
js("$( \"#highligted_build\" )").autocomplete(autocompleteParameters)
|
js("$( \"#highligted_build\" )").autocomplete(autocompleteParameters)
|
||||||
js("$('#highligted_build')").change({
|
js("$('#highligted_build')").change({ value ->
|
||||||
|
println(value)
|
||||||
val newValue = js("$(this).val()").toString()
|
val newValue = js("$(this).val()").toString()
|
||||||
if (newValue.isEmpty() || newValue in builds.map {it.buildNumber}) {
|
if (newValue.isEmpty() || newValue in builds.map {it.buildNumber}) {
|
||||||
val newLink = "http://${window.location.host}/?target=${parameters["target"]}&type=${parameters["type"]}" +
|
val newLink = "http://${window.location.host}/?target=${parameters["target"]}&type=${parameters["type"]}" +
|
||||||
|
|||||||
Reference in New Issue
Block a user