Skip to content

Commit

Permalink
fix nightly build tests (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning authored Nov 13, 2023
1 parent fa34b90 commit b4b9c68
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 27 deletions.
64 changes: 39 additions & 25 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,50 @@ inThisBuild(Def.settings(
(Global / onLoad).value
}))

val logLevelProjectList: Seq[ProjectReference] = {
if (System.getProperty(PekkoDependency.pekkoBuildVersionPropertyName) == "main") {
Seq.empty
} else {
Seq[ProjectReference](managementLoglevelsLogback)
}
} ++ {
if (System.getProperty(PekkoDependency.pekkoBuildVersionPropertyName) == "main"
&& !Common.testWithSlf4J2) {
Seq.empty
} else {
Seq[ProjectReference](managementLoglevelsLogback)
}
} ++ Seq[ProjectReference](managementLoglevelsLog4j2Slf4j2)

val projectList: Seq[ProjectReference] = Seq[ProjectReference](
// When this aggregate is updated the list of modules in ManifestInfo.checkSameVersion
// in management should also be updated
discoveryAwsApi,
discoveryAwsApiAsync,
discoveryConsul,
discoveryKubernetesApi,
discoveryMarathonApi,
management,
managementPki,
managementClusterHttp,
managementClusterBootstrap) ++ logLevelProjectList ++ Seq[ProjectReference](
integrationTestAwsApiEc2TagBased,
integrationTestLocal,
integrationTestAwsApiEcs,
integrationTestKubernetesApi,
integrationTestKubernetesApiJava,
integrationTestKubernetesDns,
integrationTestMarathonApiDocker,
leaseKubernetes,
leaseKubernetesIntTest,
docs)

// root
lazy val root = project
.in(file("."))
.enablePlugins(ScalaUnidocPlugin)
.disablePlugins(MimaPlugin)
.aggregate(
// When this aggregate is updated the list of modules in ManifestInfo.checkSameVersion
// in management should also be updated
discoveryAwsApi,
discoveryAwsApiAsync,
discoveryConsul,
discoveryKubernetesApi,
discoveryMarathonApi,
management,
managementPki,
managementClusterHttp,
managementClusterBootstrap,
managementLoglevelsLogback,
managementLoglevelsLog4j2,
managementLoglevelsLog4j2Slf4j2,
integrationTestAwsApiEc2TagBased,
integrationTestLocal,
integrationTestAwsApiEcs,
integrationTestKubernetesApi,
integrationTestKubernetesApiJava,
integrationTestKubernetesDns,
integrationTestMarathonApiDocker,
leaseKubernetes,
leaseKubernetesIntTest,
docs)
.aggregate(projectList: _*)
.settings(
name := "pekko-management-root",
GlobalScope / parallelExecution := false)
Expand Down
2 changes: 2 additions & 0 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ object Common extends AutoPlugin {
override lazy val buildSettings = Seq(
dynverSonatypeSnapshots := true)

val testWithSlf4J2: Boolean = java.lang.Boolean.getBoolean("pekko.test.slf4j2")

private def isJdk8 =
VersionNumber(sys.props("java.specification.version")).matchesSemVer(SemanticSelector(s"=1.8"))
}
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ object Dependencies {
"org.apache.pekko" %% "pekko-testkit" % pekkoVersion % Test,
"org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpVersion % Test)

val managementLoglevelsLogbackSlf4j2Overrides = if (java.lang.Boolean.getBoolean("pekko.test.slf4j2")) {
val managementLoglevelsLogbackSlf4j2Overrides = if (Common.testWithSlf4J2) {
Seq(
"org.slf4j" % "slf4j-api" % "2.0.9",
"ch.qos.logback" % "logback-classic" % "1.3.11" % Test)
Expand Down
4 changes: 3 additions & 1 deletion project/PekkoDependency.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import scala.util.matching.Regex.Groups

object PekkoDependency {

val pekkoBuildVersionPropertyName = "pekko.build.pekko.version"

sealed trait Pekko {
def version: String
// The version to use in api/japi/docs links,
Expand All @@ -36,7 +38,7 @@ object PekkoDependency {
case Some(pekkoSources) =>
Sources(pekkoSources)
case None =>
Option(System.getProperty("pekko.build.pekko.version")) match {
Option(System.getProperty(pekkoBuildVersionPropertyName)) match {
case Some("main") => mainSnapshot
case Some("default") | None => Artifact(defaultVersion)
case Some(other) => Artifact(other, true)
Expand Down

0 comments on commit b4b9c68

Please sign in to comment.