-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
90 lines (67 loc) · 3.24 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name := "web-events"
organization := "com.advancedtelematic"
scalaVersion := "2.12.10"
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8", "-Ypartial-unification")
resolvers += "ATS Releases" at "https://nexus.ota.here.com/content/repositories/releases"
resolvers += "ATS Snapshots" at "https://nexus.ota.here.com/content/repositories/snapshots"
libraryDependencies ++= {
val akkaV = "2.6.5"
val akkaHttpV = "10.1.12"
val scalaTestV = "3.0.8"
val libatsV = "0.4.1-14-g4b22754"
val jwsV = "0.4.5-11-ga01793d"
Seq(
"com.typesafe.akka" %% "akka-actor" % akkaV,
"com.typesafe.akka" %% "akka-stream" % akkaV,
"com.typesafe.akka" %% "akka-stream-testkit" % akkaV % Test,
"com.typesafe.akka" %% "akka-http-core" % akkaHttpV,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpV % Test,
"com.typesafe.akka" %% "akka-slf4j" % akkaV,
"org.scalatest" %% "scalatest" % scalaTestV % "test",
"ch.qos.logback" % "logback-classic" % "1.2.10",
"com.advancedtelematic" %% "libats" % libatsV,
"com.advancedtelematic" %% "libats-messaging" % libatsV,
"com.advancedtelematic" %% "libats-messaging-datatype" % libatsV,
"com.advancedtelematic" %% "libats-metrics" % libatsV,
"com.advancedtelematic" %% "libats-metrics-akka" % libatsV,
"com.advancedtelematic" %% "libats-metrics-prometheus" % libatsV,
"com.advancedtelematic" %% "libats-logging" % libatsV,
"com.advancedtelematic" %% "jw-security-core" % jwsV,
"com.advancedtelematic" %% "jw-security-jca" % jwsV,
"commons-codec" % "commons-codec" % "1.12"
)
}
sonarProperties ++= Map(
"sonar.projectName" -> "OTA Connect Web Events",
"sonar.projectKey" -> "ota-connect-web-events",
"sonar.host.url" -> "https://sonar7.devtools.in.here.com",
"sonar.links.issue" -> "https://saeljira.it.here.com/projects/OTA/issues",
"sonar.links.scm" -> "https://main.gitlab.in.here.com/olp/edge/ota/connect/back-end/web-events",
"sonar.links.ci" -> "https://main.gitlab.in.here.com/olp/edge/ota/connect/back-end/web-events/pipelines",
"sonar.java.binaries" -> "./target/scala-*/classes",
"sonar.scala.coverage.reportPaths"->"target/scala-2.12/scoverage-report/scoverage.xml",
"sonar.projectVersion" -> version.value,
"sonar.language" -> "scala")
enablePlugins(BuildInfoPlugin)
buildInfoOptions += BuildInfoOption.ToMap
buildInfoOptions += BuildInfoOption.BuildTime
import com.typesafe.sbt.packager.docker._
dockerRepository in Docker := Some("advancedtelematic")
packageName in Docker := packageName.value
dockerAlias := dockerAlias.value.withTag(git.gitHeadCommit.value)
dockerUpdateLatest in Docker := true
defaultLinuxInstallLocation in Docker := s"/opt/${moduleName.value}"
dockerCommands := Seq(
Cmd("FROM", "advancedtelematic/alpine-jre:adoptopenjdk-jre8u262-b10"),
ExecCmd("RUN", "mkdir", "-p", s"/var/log/${moduleName.value}"),
Cmd("ADD", "opt /opt"),
Cmd("WORKDIR", s"/opt/${moduleName.value}"),
ExecCmd("ENTRYPOINT", s"/opt/${moduleName.value}/bin/${moduleName.value}"),
Cmd("RUN", s"chown -R daemon:daemon /opt/${moduleName.value}"),
Cmd("RUN", s"chown -R daemon:daemon /var/log/${moduleName.value}"),
Cmd("USER", "daemon")
)
enablePlugins(JavaAppPackaging)
enablePlugins(GitVersioning)
Revolver.settings
Release.settings