11package builds
22
33import jetbrains.buildServer.configs.kotlin.BuildStep
4- import jetbrains.buildServer.configs.kotlin.BuildStepConditions
54import jetbrains.buildServer.configs.kotlin.BuildType
5+ import jetbrains.buildServer.configs.kotlin.buildFeatures.buildCache
66import jetbrains.buildServer.configs.kotlin.buildFeatures.dockerSupport
77import jetbrains.buildServer.configs.kotlin.buildSteps.MavenBuildStep
88import jetbrains.buildServer.configs.kotlin.buildSteps.ScriptBuildStep
@@ -34,23 +34,36 @@ class IntegrationTests(id: String, name: String, init: BuildType.() -> Unit) :
3434 </settings>
3535 */
3636
37- artifactRules = " packaging/neo4j-kafka-connect-neo4j-*-SNAPSHOT.jar => docker/plugins"
3837 params {
3938 text(" env.PACKAGES_USERNAME" , " %github-packages-user%" )
4039 password(" env.PACKAGES_PASSWORD" , " %github-packages-token%" )
40+
41+ text(" env.BROKER_EXTERNAL_HOST" , " broker:29092" )
42+ text(" env.SCHEMA_CONTROL_REGISTRY_URI" , " http://schema-registry:8081" )
43+ text(" env.SCHEMA_CONTROL_REGISTRY_EXTERNAL_URI" , " http://schema-registry:8081" )
44+ text(" env.KAFKA_CONNECT_EXTERNAL_URI" , " http://connect:8083" )
45+ text(" env.NEO4J_URI" , " neo4j://neo4j" )
46+ text(" env.NEO4J_EXTERNAL_URI" , " neo4j://neo4j" )
47+ text(" env.NEO4J_USER" , " neo4j" )
48+ text(" env.NEO4J_PASSWORD" , " password" )
4149 }
4250
4351 steps {
4452 script {
45- scriptContent = """
53+ scriptContent =
54+ """
4655 #!/bin/bash -eu
4756 # TODO: publish custom image instead
4857 apt-get update
4958 apt-get install --yes ruby-full
5059 gem install dip
5160 curl -fsSL https://get.docker.com | sh
5261 dip compose up -d neo4j zookeeper broker schema-registry control-center
53- """ .trimIndent()
62+ until [ "`docker inspect -f {{.State.Health.Status}} control-center`"=="healthy" ]; do
63+ sleep 0.1;
64+ done;
65+ """
66+ .trimIndent()
5467 formatStderrAsError = true
5568
5669 dockerImagePlatform = ScriptBuildStep .ImagePlatform .Linux
@@ -59,25 +72,30 @@ class IntegrationTests(id: String, name: String, init: BuildType.() -> Unit) :
5972 }
6073 maven {
6174 this .goals = " verify"
62- this .runnerArgs = " -DskipUnitTests"
75+ this .runnerArgs = " $MAVEN_DEFAULT_ARGS -DskipUnitTests"
6376
6477 // this is the settings name we uploaded to Connectors project
6578 userSettingsSelection = " github"
79+ localRepoScope = MavenBuildStep .RepositoryScope .MAVEN_DEFAULT
6680
6781 dockerImagePlatform = MavenBuildStep .ImagePlatform .Linux
6882 dockerImage = " eclipse-temurin:11-jdk"
69- dockerRunParameters = " --volume /var/run/docker.sock:/var/run/docker.sock"
83+ dockerRunParameters =
84+ " --volume /var/run/docker.sock:/var/run/docker.sock --network neo4j-kafka-connector_default"
7085 }
7186 script {
72- scriptContent = """
87+ scriptContent =
88+ """
7389 #!/bin/bash -eu
7490 # TODO: publish custom image instead
7591 apt-get update
7692 apt-get install --yes ruby-full
7793 gem install dip
7894 curl -fsSL https://get.docker.com | sh
95+ dip compose logs --no-color
7996 dip compose down --rmi local
80- """ .trimIndent()
97+ """
98+ .trimIndent()
8199 formatStderrAsError = true
82100
83101 executionMode = BuildStep .ExecutionMode .ALWAYS
@@ -87,8 +105,17 @@ class IntegrationTests(id: String, name: String, init: BuildType.() -> Unit) :
87105 }
88106 }
89107
90- features { dockerSupport {} }
108+ features {
109+ dockerSupport {}
91110
92- requirements { runOnLinux(LinuxSize .LARGE ) }
111+ buildCache {
112+ this .name = " neo4j-kafka-connector"
113+ publish = true
114+ use = true
115+ publishOnlyChanged = true
116+ rules = " .m2/repository"
117+ }
118+ }
93119
120+ requirements { runOnLinux(LinuxSize .LARGE ) }
94121 })
0 commit comments