solution: publish to docker with latest tag

This commit is contained in:
Igor Artamonov
2019-08-11 21:27:39 -04:00
parent 89bd52a267
commit 9f211232fd

View File

@@ -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 = [