-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
109 lines (88 loc) · 3.99 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name := "campaigner"
organization := "com.advancedtelematic"
scalaVersion := "2.12.10"
scalacOptions := Seq(
"-feature",
"-unchecked",
"-deprecation",
"-encoding",
"utf8",
"-Xlint:_",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-unused-import"
)
// allow imports in the console on a single line
scalacOptions in (Compile, console) ~= (_ filterNot (_ == "-Ywarn-unused-import"))
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 libatsV = "0.4.1-10-gc950158"
val libtufV = "0.7.4-21-g94b8744"
val scalaTestV = "3.0.8"
val slickV = "3.2.0"
Seq(
"ch.qos.logback" % "logback-classic" % "1.2.10",
"com.typesafe.akka" %% "akka-actor" % akkaV,
"com.typesafe.akka" %% "akka-http" % akkaHttpV,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpV % Test,
"com.typesafe.akka" %% "akka-slf4j" % akkaV,
"com.typesafe.akka" %% "akka-stream" % akkaV,
"com.typesafe.akka" %% "akka-stream-testkit" % akkaV % Test,
"com.typesafe.slick" %% "slick" % slickV,
"com.typesafe.slick" %% "slick-hikaricp" % slickV,
"org.mariadb.jdbc" % "mariadb-java-client" % "2.4.4",
"com.advancedtelematic" %% "libats" % libatsV,
"com.advancedtelematic" %% "libats-http" % libatsV,
"com.advancedtelematic" %% "libats-http-tracing" % libatsV,
"com.advancedtelematic" %% "libats-auth" % 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-kafka" % libatsV,
"com.advancedtelematic" %% "libats-metrics-prometheus" % libatsV,
"com.advancedtelematic" %% "libats-slick" % libatsV,
"com.advancedtelematic" %% "libats-logging" % libatsV,
"com.advancedtelematic" %% "libtuf" % libtufV,
"com.advancedtelematic" %% "libtuf-server" % libtufV,
"org.scalacheck" %% "scalacheck" % "1.14.1" % Test,
"org.scalatest" %% "scalatest" % scalaTestV % Test,
"com.typesafe.akka" %% "akka-testkit" % akkaV % Test
)
}
sonarProperties ++= Map(
"sonar.projectName" -> "OTA Connect Campaigner",
"sonar.projectKey" -> "ota-connect-campaigner",
"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/campaigner",
"sonar.links.ci" -> "https://main.gitlab.in.here.com/olp/edge/ota/connect/back-end/campaigner/pipelines",
"sonar.projectVersion" -> version.value,
"sonar.java.binaries" -> "./target/scala-*/classes",
"sonar.scala.coverage.reportPaths"->"target/scala-2.12/scoverage-report/scoverage.xml",
"sonar.language" -> "scala")
enablePlugins(BuildInfoPlugin)
buildInfoOptions += BuildInfoOption.ToMap
buildInfoOptions += BuildInfoOption.BuildTime
mainClass in Compile := Some("com.advancedtelematic.campaigner.Boot")
import com.typesafe.sbt.packager.docker._
dockerRepository := Some("advancedtelematic")
packageName in Docker := packageName.value
dockerUpdateLatest := true
dockerAlias := dockerAlias.value.withTag(git.gitHeadCommit.value)
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, GitVersioning)