solution: publish to docker with latest tag
This commit is contained in:
15
build.gradle
15
build.gradle
@@ -120,18 +120,19 @@ application {
|
|||||||
mainClassName = 'io.emeraldpay.dshackle.StarterKt'
|
mainClassName = 'io.emeraldpay.dshackle.StarterKt'
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
|
||||||
dockerTags = [project.version].with (true) {
|
|
||||||
add "t"+ DateTimeFormatter.ofPattern("yyyyMMddHHmm").withZone(ZoneId.of('UTC')).format(Instant.now())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
jib {
|
jib {
|
||||||
from {
|
from {
|
||||||
}
|
}
|
||||||
to {
|
to {
|
||||||
image = 'emeraldpay/dshackle:snapshot'
|
image = 'emeraldpay/dshackle:snapshot'
|
||||||
tags = dockerTags
|
tags = [project.version].with (true) {
|
||||||
|
add "t"+ DateTimeFormatter.ofPattern("yyyyMMddHHmm").withZone(ZoneId.of('UTC')).format(Instant.now())
|
||||||
|
// execute with -Platest=true
|
||||||
|
// $ gradle jib -Platest=true
|
||||||
|
if (project.hasProperty('latest') && project.property('latest') == 'true') {
|
||||||
|
add "latest"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
container {
|
container {
|
||||||
jvmFlags = [
|
jvmFlags = [
|
||||||
|
|||||||
Reference in New Issue
Block a user