forked from conduktor/kafka-security-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'conduktor:master' into master
- Loading branch information
Showing
15 changed files
with
561 additions
and
45 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
.bsp/ | ||
target/ | ||
.idea/ | ||
local.* | ||
src/main/resources/specs/KsmService.yml | ||
.metals/ | ||
.bloop/ | ||
data/ | ||
data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,54 @@ | ||
inThisBuild(List( | ||
organization := "io.conduktor", | ||
homepage := Some(url("https://github.com/conduktor/kafka-security-manager")), | ||
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), | ||
developers := List( | ||
Developer( | ||
"conduktor", | ||
"Stephane Maarek", | ||
"[email protected]", | ||
url("https://github.com/conduktor") | ||
) | ||
ThisBuild / organization := "io.conduktor" | ||
ThisBuild / homepage := Some(url("https://github.com/conduktor/kafka-security-manager")) | ||
ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")) | ||
ThisBuild /developers := List( | ||
Developer( | ||
"conduktor", | ||
"Stephane Maarek", | ||
"[email protected]", | ||
url("https://github.com/conduktor") | ||
) | ||
)) | ||
|
||
) | ||
import scala.sys.process.Process | ||
|
||
name := "kafka-security-manager" | ||
|
||
|
||
version := "1.0.0-SNAPSHOT" | ||
|
||
scalaVersion := "2.12.8" | ||
version := "1.1.0-SNAPSHOT" | ||
|
||
scalaVersion := "2.12.15" | ||
|
||
lazy val ensureDockerBuildx = taskKey[Unit]("Ensure that docker buildx configuration exists") | ||
lazy val dockerBuildWithBuildx = taskKey[Unit]("Build docker images using buildx") | ||
lazy val dockerBuildxSettings = Seq( | ||
ensureDockerBuildx := { | ||
if (Process("docker buildx inspect multi-arch-builder").! == 1) { | ||
Process("docker buildx create --use --name multi-arch-builder", baseDirectory.value).! | ||
} | ||
}, | ||
dockerBuildWithBuildx := { | ||
streams.value.log("Building and pushing image with Buildx") | ||
dockerAliases.value.foreach(alias => | ||
Process( | ||
"docker buildx build --platform=linux/arm64,linux/amd64 --push -t " + alias + " .", | ||
baseDirectory.value / "target" / "docker" / "stage" | ||
).! | ||
) | ||
}, | ||
Docker / publish := Def | ||
.sequential( | ||
Docker / publishLocal, | ||
ensureDockerBuildx, | ||
dockerBuildWithBuildx | ||
) | ||
.value | ||
) | ||
|
||
lazy val root = (project in file(".")) | ||
.enablePlugins(JavaAppPackaging) | ||
.enablePlugins(DockerPlugin) | ||
.enablePlugins(ClasspathJarPlugin) | ||
|
||
.enablePlugins(AshScriptPlugin) | ||
.settings(dockerBuildxSettings) | ||
|
||
resolvers ++= Seq( | ||
"Artima Maven Repository" at "https://repo.artima.com/releases", | ||
|
@@ -33,52 +57,59 @@ resolvers ++= Seq( | |
|
||
libraryDependencies ++= Seq( | ||
// kafka | ||
"org.apache.kafka" %% "kafka" % "2.5.0", | ||
"io.github.embeddedkafka" %% "embedded-kafka" % "2.5.0" % "test", | ||
"org.apache.kafka" %% "kafka" % "2.8.1", | ||
"io.github.embeddedkafka" %% "embedded-kafka" % "2.8.1" % "test", | ||
"io.findify" %% "s3mock" % "0.2.6" % "test", | ||
|
||
//netty | ||
"io.netty" % "netty-handler" % "4.1.72.Final", | ||
|
||
"org.apache.kafka" % "kafka-clients" % "2.5.0", // needed explicitly for proper classPath | ||
"org.apache.kafka" % "kafka-clients" % "2.5.0" % Test classifier "test", | ||
|
||
// test | ||
"org.scalatest" %% "scalatest" % "3.0.5" % Test, | ||
"org.scalamock" %% "scalamock" % "5.1.0" % Test, | ||
"com.github.tomakehurst" % "wiremock" % "2.27.2" % Test, | ||
|
||
// logging | ||
"org.slf4j" % "slf4j-api" % "1.7.25", | ||
"org.slf4j" % "slf4j-log4j12" % "1.7.25", | ||
"org.slf4j" % "slf4j-api" % "1.7.32", | ||
"org.slf4j" % "slf4j-log4j12" % "1.7.32", | ||
"org.apache.logging.log4j" % "log4j" % "2.17.1", | ||
|
||
// config | ||
"com.typesafe" % "config" % "1.3.3", | ||
|
||
// parsers | ||
"com.github.tototoshi" %% "scala-csv" % "1.3.5", | ||
"io.circe" %% "circe-yaml" % "0.12.0", | ||
"io.circe" %% "circe-generic" % "0.12.0", | ||
"io.circe" %% "circe-yaml" % "0.14.1", | ||
"io.circe" %% "circe-generic" % "0.14.1", | ||
|
||
// APIs | ||
"org.skinny-framework" %% "skinny-http-client" % "2.3.7", | ||
"com.fasterxml.jackson.core" % "jackson-core" % "2.9.4", | ||
"com.fasterxml.jackson.core" % "jackson-core" % "2.13.1", | ||
|
||
// AWS SDK to access S3 | ||
"com.amazonaws" % "aws-java-sdk-s3" % "1.11.385" | ||
"com.amazonaws" % "aws-java-sdk-s3" % "1.11.385", | ||
|
||
// Google Auth | ||
"com.google.auth" % "google-auth-library-oauth2-http" % "0.25.5" | ||
|
||
) | ||
|
||
mainClass in Compile := Some("io.conduktor.ksm.KafkaSecurityManager") | ||
Compile / mainClass := Some("io.conduktor.ksm.KafkaSecurityManager") | ||
|
||
parallelExecution in Test := false | ||
Test / parallelExecution := false | ||
|
||
// Docker stuff | ||
dockerRepository := Some("conduktor") | ||
dockerUpdateLatest := true | ||
dockerBaseImage := "openjdk:8-jre-slim" | ||
|
||
dockerBaseImage := "openjdk:11-jre-slim" | ||
|
||
|
||
assemblyMergeStrategy in assembly := { | ||
case PathList("META-INF", _ @ _*) => MergeStrategy.discard | ||
assembly / assemblyMergeStrategy := { | ||
case PathList("META-INF", _@_*) => MergeStrategy.discard | ||
case _ => MergeStrategy.first | ||
} | ||
|
||
assemblyJarName in assembly := s"${name.value}-${version.value}.jar" | ||
assembly / assemblyJarName := s"${name.value}-${version.value}.jar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version = 1.5.2 | ||
sbt.version = 1.6.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.