-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
56 lines (51 loc) · 1.54 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import com.typesafe.sbt.packager.docker._
enablePlugins(GitVersioning, JavaServerAppPackaging, DockerPlugin)
name := "anchore-policy-sidecar"
scalaVersion := "2.13.3"
git.useGitDescribe := true
scalacOptions ++= Seq(
"-encoding",
"UTF-8",
"-feature",
"-unchecked",
"-deprecation",
"-language:postfixOps",
"-language:implicitConversions",
"-Wunused:imports",
"-Xfatal-warnings",
"-Xlint:_"
)
val zioVersion = "1.0.3"
libraryDependencies := Seq(
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-process" % "0.1.0",
"dev.zio" %% "zio-config" % "1.0.0-RC27",
"dev.zio" %% "zio-config-typesafe" % "1.0.0-RC27",
"com.github.pathikrit" %% "better-files" % "3.9.1",
"com.lihaoyi" %% "requests" % "0.6.5",
"io.spray" %% "spray-json" % "1.3.5",
"dev.zio" %% "zio-test" % zioVersion % Test,
"dev.zio" %% "zio-test-sbt" % zioVersion % Test,
"org.scalatest" %% "scalatest" % "3.2.0" % Test
)
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")
dockerUpdateLatest := true
dockerExposedPorts := Seq(9000)
dockerBaseImage := "adoptopenjdk/openjdk11:debianslim-jre"
dockerCommands ++= Seq(
Cmd("USER", "root"),
ExecCmd("RUN", "apt", "update"),
ExecCmd("RUN", "apt", "install", "-y", "git"),
ExecCmd("RUN", "apt", "clean"),
Cmd("USER", "1001")
)
dockerUsername := Some("jwiii")
dockerRepository := {
if (sys.env.exists {
case ("uK8s", "1") => true
case ("uK8s", "0") => false
case ("uK8s", b) => b.toBoolean
case _ => false
}) Some("localhost:32000")
else None
}