Skip to content

Commit

Permalink
TeamCity: build configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
hsz committed Mar 3, 2023
1 parent fd5dcef commit 187ab69
Showing 1 changed file with 29 additions and 39 deletions.
68 changes: 29 additions & 39 deletions .teamcity/settings.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View
version = "2022.10"

project {
buildType(UnitTestsLinux)
buildType(UnitTestsWindows)

description = "Gradle plugin for building plugins for IntelliJ-based IDEs – https://github.com/JetBrains/gradle-intellij-plugin"

features {
Expand All @@ -46,52 +43,45 @@ project {
repositoryURL = "https://github.com/JetBrains/gradle-intellij-plugin"
}
}
}

fun BuildType.configure(family: String) = {
val operatingSystems = listOf("Linux", "Windows", "macOS")
val gradleVersions = listOf("7.3", "7.6.1", "8.0.1")

name = "Unit Tests ($family)"

vcs {
root(DslContext.settingsRoot)
}
operatingSystems.forEach { os ->
buildType {
id("UnitTests${os.uppercase()}")
name = "Unit Tests ($os)"

steps {
gradleVersions.forEach { gradleVersion ->
gradle {
name = "Unit Tests – Gradle $gradleVersion"
tasks = "check -PtestGradleVersion=$gradleVersion"
vcs {
root(DslContext.settingsRoot)
}
}
}

triggers {
vcs {
}
}
steps {
gradleVersions.forEach { gradleVersion ->
gradle {
name = "Unit Tests – Gradle $gradleVersion"
tasks = "check -PtestGradleVersion=$gradleVersion"
}
}
}

features {
commitStatusPublisher {
publisher = github {
githubUrl = "https://api.github.com"
authType = personalToken {
token = "credentialsJSON:935e7750-4963-410f-8aab-e86748770a1f"
features {
commitStatusPublisher {
publisher = github {
githubUrl = "https://api.github.com"
authType = personalToken {
token = "credentialsJSON:935e7750-4963-410f-8aab-e86748770a1f"
}
}
param("github_oauth_user", "hsz")
}
}
param("github_oauth_user", "hsz")
}
}

requirements {
add {
equals("teamcity.agent.jvm.os.family", family)
requirements {
add {
equals("teamcity.agent.jvm.os.family", os)
}
}
}
}
}
object UnitTestsLinux : BuildType({
this.configure("Linux")
})
object UnitTestsWindows : BuildType({
this.configure("Windows")
})

0 comments on commit 187ab69

Please sign in to comment.