summaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-01-28 22:31:12 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-01-28 22:31:12 +0100
commitf7bf7c44664a9f48a8839a961680f17314dcae6e (patch)
tree2acc86ab2c38cfe7fc57033c6bd7fa67531ce13e /build.gradle
parent2f5374598fbdfbf5ccdf44930706133bc7986e83 (diff)
Maven, Gradle: Build Docker image.
Change-Id: Ibf90cd31af67f847d67bd34fe1a8d73d49550088
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle20
1 files changed, 18 insertions, 2 deletions
diff --git a/build.gradle b/build.gradle
index ae57661..374b627 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,7 @@
plugins {
id 'java'
id 'io.quarkus'
+ id "com.bmuschko.docker-remote-api" version "${dockerPluginVersion}"
id "com.diffplug.gradle.spotless" version "${spotlessPluginVersion}"
id "com.github.ben-manes.versions" version "${versionsPluginVersion}"
id "se.patrikerdes.use-latest-versions" version "${useLatestVersionsPluginVersion}"
@@ -85,8 +86,8 @@ spotless {
}
}
-group 'eu.mulk'
-version '0.1.0-SNAPSHOT'
+group "eu.mulk"
+version "${projectVersion}"
task yarnInstall(type:Exec) {
workingDir "src/main/resources/META-INF/resources"
@@ -113,3 +114,18 @@ processResources {
}
quarkusBuild.dependsOn compileWeb
+
+task buildDocker(type: com.bmuschko.gradle.docker.tasks.image.DockerBuildImage) {
+ inputDir = file(".")
+ dockerFile = file("src/main/docker/Dockerfile.jvm")
+ images.add("docker.benkard.de/mulk/mulkcms2:${projectVersion}")
+}
+
+buildDocker.dependsOn quarkusBuild
+assemble.dependsOn buildDocker
+
+task pushDocker(type: com.bmuschko.gradle.docker.tasks.image.DockerPushImage) {
+ images.add("docker.benkard.de/mulk/mulkcms2:${projectVersion}")
+}
+
+pushDocker.dependsOn buildDocker