Skip to content

Commit a54ef0e

Browse files
authored
ci: fix compat build scheduling and notifications (#347)
1 parent 2d7c45b commit a54ef0e

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

.teamcity/builds/Build.kt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,18 @@ class Build(
128128
if (!forPullRequests) {
129129
complete.features {
130130
notifications {
131-
buildFailedToStart = true
132-
buildFailed = true
133-
firstFailureAfterSuccess = true
134-
firstSuccessAfterFailure = true
135-
buildProbablyHanging = true
136-
137-
branchFilter = "+:main"
131+
branchFilter =
132+
"""
133+
+:$DEFAULT_BRANCH
134+
${if (forPullRequests) "+:pull/*" else ""}
135+
"""
136+
.trimIndent()
137+
138+
queuedBuildRequiresApproval = forPullRequests
139+
buildFailedToStart = !forPullRequests
140+
buildFailed = !forPullRequests
141+
buildFinishedSuccessfully = !forPullRequests
142+
buildProbablyHanging = !forPullRequests
138143

139144
notifierSettings = slackNotifier {
140145
connection = SLACK_CONNECTION_ID

.teamcity/builds/Common.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const val GITHUB_OWNER = "neo4j"
2222
const val GITHUB_REPOSITORY = "neo4j-kafka-connector"
2323
const val MAVEN_DEFAULT_ARGS =
2424
"--no-transfer-progress --batch-mode -Dmaven.repo.local=%teamcity.build.checkoutDir%/.m2/repository"
25+
const val DEFAULT_BRANCH = "main"
2526

2627
val DEFAULT_JAVA_VERSION = JavaVersion.V_11
2728
const val DEFAULT_CONFLUENT_PLATFORM_VERSION = "7.2.9"
@@ -52,11 +53,11 @@ enum class Neo4jVersion(val version: String, val dockerImage: String) {
5253
V_5("5", "neo4j:5-enterprise"),
5354
V_5_DEV(
5455
"5-dev",
55-
"535893049302.dkr.ecr.eu-west-1.amazonaws.com/build-service/neo4j:5-enterprise-debian-nightly"),
56+
"535893049302.dkr.ecr.eu-west-1.amazonaws.com/build-service/neo4j:5-enterprise-debian-nightly-bundle"),
5657
V_2025("2025", "neo4j:2025-enterprise"),
5758
V_2025_DEV(
5859
"2025-dev",
59-
"535893049302.dkr.ecr.eu-west-1.amazonaws.com/build-service/neo4j:2025-enterprise-debian-nightly"),
60+
"535893049302.dkr.ecr.eu-west-1.amazonaws.com/build-service/neo4j:2025-enterprise-debian-nightly-bundle"),
6061
}
6162

6263
object Neo4jKafkaConnectorVcs :
@@ -66,7 +67,7 @@ object Neo4jKafkaConnectorVcs :
6667

6768
name = "neo4j-kafka-connector"
6869
url = "git@github.com:neo4j/neo4j-kafka-connector.git"
69-
branch = "refs/heads/main"
70+
branch = "refs/heads/$DEFAULT_BRANCH"
7071
branchSpec = "refs/heads/*"
7172

7273
authMethod = defaultPrivateKey { userName = "git" }

.teamcity/settings.kts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import builds.Build
2+
import builds.DEFAULT_BRANCH
23
import builds.Neo4jKafkaConnectorVcs
34
import builds.Neo4jVersion
45
import jetbrains.buildServer.configs.kotlin.Project
@@ -24,7 +25,7 @@ project {
2425
forPullRequests = false) {
2526
triggers {
2627
vcs {
27-
this.branchFilter = "+:main"
28+
this.branchFilter = "+:$DEFAULT_BRANCH"
2829
this.triggerRules =
2930
"""
3031
-:comment=^build.*release version.*:**
@@ -59,12 +60,15 @@ project {
5960
vcs { enabled = false }
6061

6162
schedule {
62-
branchFilter = "+:main"
63+
branchFilter = "+:$DEFAULT_BRANCH"
6364
schedulingPolicy = daily {
6465
hour = 8
6566
minute = 0
6667
}
6768
triggerBuild = always()
69+
withPendingChangesOnly = false
70+
enforceCleanCheckout = true
71+
enforceCleanCheckoutForDependencies = true
6872
}
6973
}
7074
})

0 commit comments

Comments
 (0)