Build: Extract bootstrap teamcity url to parameter

This commit is contained in:
Vyacheslav Gerasimov
2019-10-31 15:40:14 +03:00
parent f641e2a139
commit 95ac0e328f
+3 -2
View File
@@ -83,11 +83,12 @@ sealed class BootstrapOption {
val kotlinVersion: String, val kotlinVersion: String,
val buildNumber: String? = null, val buildNumber: String? = null,
val projectExtId: String? = null, val projectExtId: String? = null,
val onlySuccessBootstrap: Boolean = true val onlySuccessBootstrap: Boolean = true,
val teamcityUrl: String = "https://teamcity.jetbrains.com"
) : BootstrapOption() { ) : BootstrapOption() {
override fun applyToProject(project: Project) { override fun applyToProject(project: Project) {
val query = if (onlySuccessBootstrap) "status:SUCCESS,tag:bootstrap,pinned:true" else "branch:default:any" val query = if (onlySuccessBootstrap) "status:SUCCESS,tag:bootstrap,pinned:true" else "branch:default:any"
project.bootstrapKotlinRepo = "https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:${projectExtId project.bootstrapKotlinRepo = "$teamcityUrl/guestAuth/app/rest/builds/buildType:(id:${projectExtId
?: "Kotlin_dev_Compiler"}),number:${buildNumber ?: kotlinVersion},$query/artifacts/content/maven/" ?: "Kotlin_dev_Compiler"}),number:${buildNumber ?: kotlinVersion},$query/artifacts/content/maven/"
project.bootstrapKotlinVersion = kotlinVersion project.bootstrapKotlinVersion = kotlinVersion
} }