Skip to content

Commit

Permalink
Update build.sbt and travis
Browse files Browse the repository at this point in the history
  • Loading branch information
manojlds committed Nov 11, 2018
1 parent 2c8df51 commit c4eeca4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ deploy:
api_key:
secure: "aYpmzD3DR2Fwi5LEHCvlZmziS0PMBujM8m8tXMxWIdvCou+qNubiTash0nV4L8DEdhKBrtdGWM1PwNENFjEW2H8ARwrsfq0yHVQZC0W4uSbJEb+mEgqKvHSC/q0iCYTbgxmWVKyDTMueoGcqK6WNsP1gcgThgYT2UinlsFLaE6V/IATs6ll2QB4sFhcUuEvUkhuOUQJUNy1KopapZ3uosm9ROf11kdcnbhWCbVjIJuHgM8q1CBsQaMhXTu7w3lZjrFhqZzxTEm6jBlBhI83f2WEi/jQJpXzgLX94w7r6eiEf3HhDj5PSlOOyC7vWzcMHSGUInRn4uulN33qA+UkZmQx3LoLqRjjONJBq+In3gUM11cw+u8cx/qShAtcvU4AV/thM/+uQEpypFCMHRn+ZEbuhJ9EZwlk9EUgjuB0ahxL+lEaCfyXcJhh+5FgPC5QBSWCH7hAgZjXfhQnbMFAJ07w5kWQOyEXdw0uMSwzOwF34n2PuLsbpRI0timf05JJ8fq9ZFy2anvvkitS1Cu8lVWLmA6+8+zNeESG3CB20MCzgEf44/olEP9k7290IIZcxQC7+HIecr3XGr6AsK9FeGUib2aTH5mMB8RjJuasYCIzDMqrdFcDbJ7xPIIYOrLyOQvxQT/Svf1+oVeo0PtcvKATK+2/UfZXmrXEhZqKjXvg="
file:
- "./target/scala-2.11/mlflow-gocd-assembly-${TRAVIS_TAG}.jar"
- "./material/target/mlflow-gocd-material-assembly-${TRAVIS_TAG}.jar"
- "./fetch/target/mlflow-gocd-fetch-assembly-${TRAVIS_TAG}.jar"
skip_cleanup: true
on:
tags: true
58 changes: 39 additions & 19 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,44 @@ import Dependencies._

val appVersion = sys.env.get("TRAVIS_TAG") orElse sys.env.get("BUILD_LABEL") getOrElse s"1.0.0-${System.currentTimeMillis / 1000}-SNAPSHOT"

lazy val root = (project in file(".")).
lazy val commonSettings = Seq(
organization := "com.indix",
version := appVersion,
scalaVersion := "2.11.11",
unmanagedBase := file(".") / "lib",
libraryDependencies ++= Seq(
goPluginLibrary, gson, apacheCommons, commonsIo, scalaTest
),
resourceGenerators in Compile += Def.task {
val inputFile = baseDirectory.value / "template" / "plugin.xml"
val outputFile = (resourceManaged in Compile).value / "plugin.xml"
val contents = IO.read(inputFile)
IO.write(outputFile, contents.replaceAll("\\$\\{version\\}", appVersion))
Seq(outputFile)
}.taskValue,
mappings in (Compile, packageBin) += {
(resourceManaged in Compile).value / "plugin.xml" -> "plugin.xml"
},
javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
crossPaths := false,
assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false)
)

lazy val material = (project in file("material")).
settings(commonSettings: _*).
settings(
inThisBuild(List(
organization := "com.indix",
scalaVersion := "2.11.11",
version := appVersion
)),
name := "mlflow-gocd",
libraryDependencies ++= Seq(goPluginLibrary, gson, apacheCommons, httpClient, scalaTest),
resourceGenerators in Compile += Def.task {
val inputFile = baseDirectory.value / "template" / "plugin.xml"
val outputFile = (resourceManaged in Compile).value / "plugin.xml"
val contents = IO.read(inputFile)
IO.write(outputFile, contents.replaceAll("\\$\\{version\\}", appVersion))
Seq(outputFile)
}.taskValue,
mappings in (Compile, packageBin) += {
(resourceManaged in Compile).value / "plugin.xml" -> "plugin.xml"
},
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
name := "mlflow-gocd-material",
libraryDependencies ++= Seq(httpClient),
)

lazy val fetch = (project in file("fetch")).
settings(commonSettings: _*).
settings(
name := "mlflow-gocd-fetch",
libraryDependencies ++= Seq(awsS3),
)

lazy val root = Project(
id = "mlflow-gocd",
base = file(".")
) aggregate(material, fetch)

0 comments on commit c4eeca4

Please sign in to comment.