Skip to content

Commit

Permalink
Add possibility to add a config dir to the docker context.
Browse files Browse the repository at this point in the history
  • Loading branch information
alingenhag committed Dec 26, 2019
1 parent 3f254db commit d1613e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/kotlin/rule/Docker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface Docker {
var relativeDockerfilePath: String
var artifactName: String
var artifactPath: String
var artifactConfig: File?
var tag: String
var host: String
var imageId: File
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/rule/DockerImageRule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class DockerImageRule : RuleSource() {
val warTask: War = project.tasks["war"] as War
docker.artifactPath = warTask.project.relativePath(warTask.archiveFile.get().asFile)
docker.artifactName = warTask.archiveFileName.get()
docker.artifactConfig = File(warTask.project.relativePath("src/main/liberty"))
} else {
docker.artifactPath = jarTask.project.relativePath(jarTask.archiveFile.get().asFile)
docker.artifactName = jarTask.archiveFileName.get()
Expand All @@ -48,6 +49,7 @@ class DockerImageRule : RuleSource() {

from(docker.sourceContextPath)
from(docker.artifactPath)
from(docker.artifactConfig)

into(docker.contextDirectory)
}
Expand Down

0 comments on commit d1613e8

Please sign in to comment.