-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
60 lines (49 loc) · 1.42 KB
/
build.gradle
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
import com.bmuschko.gradle.docker.tasks.image.DockerPushImage
import com.bmuschko.gradle.docker.tasks.image.DockerTagImage
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'com.bmuschko.docker-java-application'
group 'com.balaclavalab'
version '0.1.5'
description = 'BLC Redis dump restore utility'
mainClassName = 'com.balaclavalab.redis.DumpRestoreCli'
sourceCompatibility = 11
targetCompatibility = 11
repositories {
mavenLocal()
mavenCentral()
}
buildscript {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'com.bmuschko:gradle-docker-plugin:3.0.11'
}
}
dependencies {
implementation 'io.lettuce:lettuce-core:5.1.3.RELEASE'
implementation 'commons-cli:commons-cli:1.4'
}
docker {
javaApplication {
baseImage = 'openjdk:11-jre-slim'
port = 8080
tag = "balaclavalab/${applicationName}:${version}"
}
}
// TODO https://github.com/bmuschko/gradle-docker-plugin/issues/41
dockerPushImage.imageName = "balaclavalab/${applicationName}"
dockerPushImage.tag = "${version}"
task dockerTagLatestImage(type: DockerTagImage) {
repository = "balaclavalab/${applicationName}"
imageId = "balaclavalab/${applicationName}:${version}"
tag = "latest"
force = true
}
task dockerPushLatestImage(type: DockerPushImage) {
imageName = "balaclavalab/${applicationName}"
tag = "latest"
}