Skip to content

Commit 187ab69

Browse files
committed
TeamCity: build configuration
1 parent fd5dcef commit 187ab69

File tree

1 file changed

+29
-39
lines changed

1 file changed

+29
-39
lines changed

.teamcity/settings.kts

Lines changed: 29 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View
3434
version = "2022.10"
3535

3636
project {
37-
buildType(UnitTestsLinux)
38-
buildType(UnitTestsWindows)
39-
4037
description = "Gradle plugin for building plugins for IntelliJ-based IDEs – https://github.com/JetBrains/gradle-intellij-plugin"
4138

4239
features {
@@ -46,52 +43,45 @@ project {
4643
repositoryURL = "https://github.com/JetBrains/gradle-intellij-plugin"
4744
}
4845
}
49-
}
5046

51-
fun BuildType.configure(family: String) = {
47+
val operatingSystems = listOf("Linux", "Windows", "macOS")
5248
val gradleVersions = listOf("7.3", "7.6.1", "8.0.1")
5349

54-
name = "Unit Tests ($family)"
55-
56-
vcs {
57-
root(DslContext.settingsRoot)
58-
}
50+
operatingSystems.forEach { os ->
51+
buildType {
52+
id("UnitTests${os.uppercase()}")
53+
name = "Unit Tests ($os)"
5954

60-
steps {
61-
gradleVersions.forEach { gradleVersion ->
62-
gradle {
63-
name = "Unit Tests – Gradle $gradleVersion"
64-
tasks = "check -PtestGradleVersion=$gradleVersion"
55+
vcs {
56+
root(DslContext.settingsRoot)
6557
}
66-
}
67-
}
6858

69-
triggers {
70-
vcs {
71-
}
72-
}
59+
steps {
60+
gradleVersions.forEach { gradleVersion ->
61+
gradle {
62+
name = "Unit Tests – Gradle $gradleVersion"
63+
tasks = "check -PtestGradleVersion=$gradleVersion"
64+
}
65+
}
66+
}
7367

74-
features {
75-
commitStatusPublisher {
76-
publisher = github {
77-
githubUrl = "https://api.github.com"
78-
authType = personalToken {
79-
token = "credentialsJSON:935e7750-4963-410f-8aab-e86748770a1f"
68+
features {
69+
commitStatusPublisher {
70+
publisher = github {
71+
githubUrl = "https://api.github.com"
72+
authType = personalToken {
73+
token = "credentialsJSON:935e7750-4963-410f-8aab-e86748770a1f"
74+
}
75+
}
76+
param("github_oauth_user", "hsz")
8077
}
8178
}
82-
param("github_oauth_user", "hsz")
83-
}
84-
}
8579

86-
requirements {
87-
add {
88-
equals("teamcity.agent.jvm.os.family", family)
80+
requirements {
81+
add {
82+
equals("teamcity.agent.jvm.os.family", os)
83+
}
84+
}
8985
}
9086
}
9187
}
92-
object UnitTestsLinux : BuildType({
93-
this.configure("Linux")
94-
})
95-
object UnitTestsWindows : BuildType({
96-
this.configure("Windows")
97-
})

0 commit comments

Comments
 (0)