Skip to content

Commit ee4266a

Browse files
committed
ci: update branch filters
1 parent 9b9c0b4 commit ee4266a

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

.teamcity/builds/Build.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class Build(
124124
}
125125

126126
bts.buildTypes().forEach {
127-
it.thisVcs()
127+
it.thisVcs(if (forPullRequests) "pull/*" else DEFAULT_BRANCH)
128128

129129
it.features {
130130
loginToECR()

.teamcity/builds/Common.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package builds
22

3+
import builds.Neo4jSparkConnectorVcs.branchSpec
34
import jetbrains.buildServer.configs.kotlin.BuildFeatures
45
import jetbrains.buildServer.configs.kotlin.BuildSteps
56
import jetbrains.buildServer.configs.kotlin.BuildType
@@ -163,9 +164,16 @@ fun Requirements.runOnLinux(size: LinuxSize = LinuxSize.SMALL) {
163164
startsWith("cloud.amazon.agent-name-prefix", "linux-${size.value}")
164165
}
165166

166-
fun BuildType.thisVcs() = vcs {
167+
fun BuildType.thisVcs(forBranch: String) = vcs {
167168
root(Neo4jSparkConnectorVcs)
168169

170+
branchSpec =
171+
"""
172+
-:*
173+
+:$forBranch
174+
"""
175+
.trimIndent()
176+
169177
cleanCheckout = true
170178
}
171179

.teamcity/settings.kts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ import jetbrains.buildServer.configs.kotlin.triggers.schedule
1111
import jetbrains.buildServer.configs.kotlin.triggers.vcs
1212
import jetbrains.buildServer.configs.kotlin.version
1313

14-
version = "2025.03"
14+
version = "2025.11"
1515

1616
project {
17+
name = "5.0"
18+
1719
params {
1820
text("osssonatypeorg-username", "%publish-username%")
1921
password("osssonatypeorg-password", "%publish-password%")
@@ -58,7 +60,16 @@ project {
5860
neo4jVersions = setOf(Neo4jVersion.V_4_4, Neo4jVersion.V_5, Neo4jVersion.V_2025),
5961
forPullRequests = true,
6062
) {
61-
triggers { vcs { this.branchFilter = "+:pull/*" } }
63+
triggers {
64+
vcs {
65+
this.branchFilter =
66+
"""
67+
+:$DEFAULT_BRANCH
68+
+:pull/*
69+
"""
70+
.trimIndent()
71+
}
72+
}
6273
},
6374
)
6475

0 commit comments

Comments
 (0)