Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .teamcity/builds/Build.kt
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,18 @@ class Build(
if (!forPullRequests) {
complete.features {
notifications {
buildFailedToStart = true
buildFailed = true
firstFailureAfterSuccess = true
firstSuccessAfterFailure = true
buildProbablyHanging = true

branchFilter = "+:main"
branchFilter =
"""
+:$DEFAULT_BRANCH
${if (forPullRequests) "+:pull/*" else ""}
"""
.trimIndent()

queuedBuildRequiresApproval = forPullRequests
buildFailedToStart = !forPullRequests
buildFailed = !forPullRequests
buildFinishedSuccessfully = !forPullRequests
buildProbablyHanging = !forPullRequests

notifierSettings = slackNotifier {
connection = SLACK_CONNECTION_ID
Expand Down
7 changes: 4 additions & 3 deletions .teamcity/builds/Common.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const val GITHUB_OWNER = "neo4j"
const val GITHUB_REPOSITORY = "neo4j-kafka-connector"
const val MAVEN_DEFAULT_ARGS =
"--no-transfer-progress --batch-mode -Dmaven.repo.local=%teamcity.build.checkoutDir%/.m2/repository"
const val DEFAULT_BRANCH = "main"

val DEFAULT_JAVA_VERSION = JavaVersion.V_11
const val DEFAULT_CONFLUENT_PLATFORM_VERSION = "7.2.9"
Expand Down Expand Up @@ -52,11 +53,11 @@ enum class Neo4jVersion(val version: String, val dockerImage: String) {
V_5("5", "neo4j:5-enterprise"),
V_5_DEV(
"5-dev",
"535893049302.dkr.ecr.eu-west-1.amazonaws.com/build-service/neo4j:5-enterprise-debian-nightly"),
"535893049302.dkr.ecr.eu-west-1.amazonaws.com/build-service/neo4j:5-enterprise-debian-nightly-bundle"),
V_2025("2025", "neo4j:2025-enterprise"),
V_2025_DEV(
"2025-dev",
"535893049302.dkr.ecr.eu-west-1.amazonaws.com/build-service/neo4j:2025-enterprise-debian-nightly"),
"535893049302.dkr.ecr.eu-west-1.amazonaws.com/build-service/neo4j:2025-enterprise-debian-nightly-bundle"),
}

object Neo4jKafkaConnectorVcs :
Expand All @@ -66,7 +67,7 @@ object Neo4jKafkaConnectorVcs :

name = "neo4j-kafka-connector"
url = "git@github.com:neo4j/neo4j-kafka-connector.git"
branch = "refs/heads/main"
branch = "refs/heads/$DEFAULT_BRANCH"
branchSpec = "refs/heads/*"

authMethod = defaultPrivateKey { userName = "git" }
Expand Down
8 changes: 6 additions & 2 deletions .teamcity/settings.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import builds.Build
import builds.DEFAULT_BRANCH
import builds.Neo4jKafkaConnectorVcs
import builds.Neo4jVersion
import jetbrains.buildServer.configs.kotlin.Project
Expand All @@ -24,7 +25,7 @@ project {
forPullRequests = false) {
triggers {
vcs {
this.branchFilter = "+:main"
this.branchFilter = "+:$DEFAULT_BRANCH"
this.triggerRules =
"""
-:comment=^build.*release version.*:**
Expand Down Expand Up @@ -59,12 +60,15 @@ project {
vcs { enabled = false }

schedule {
branchFilter = "+:main"
branchFilter = "+:$DEFAULT_BRANCH"
schedulingPolicy = daily {
hour = 8
minute = 0
}
triggerBuild = always()
withPendingChangesOnly = false
enforceCleanCheckout = true
enforceCleanCheckoutForDependencies = true
}
}
})
Expand Down