Skip to content

Commit 4524dcd

Browse files
committed
Added creation of Docker notebook image tag based on Git SHA.
1 parent 31abe23 commit 4524dcd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

project/plugins.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.10")
1616
addSbtPlugin("com.github.gseitz" %% "sbt-release" % "1.0.9")
1717
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.19")
1818
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")
19+
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
1920

2021

rf-notebook/build.sbt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import scala.sys.process.Process
22
import PythonBuildPlugin.autoImport.pyWhl
3+
import com.typesafe.sbt.git.DefaultReadableGit
34

45
lazy val includeNotebooks = settingKey[Boolean]("Whether to build documentation into notebooks and include them")
56
includeNotebooks := true
@@ -8,6 +9,11 @@ Docker / packageName := "s22s/rasterframes-notebook"
89

910
Docker / version := version.value
1011

12+
dockerAliases += dockerAlias.value.withTag({
13+
val sha = new DefaultReadableGit(file(".")).withGit(_.headCommitSha)
14+
sha.map(_.take(7))
15+
})
16+
1117
Docker / maintainer := organization.value
1218

1319
Docker / sourceDirectory := baseDirectory.value / "src"/ "main" / "docker"

0 commit comments

Comments
 (0)