problem: uploads development snapshots as :latest

This commit is contained in:
Igor Artamonov
2019-08-07 23:08:08 -04:00
parent 24c325f83a
commit 47bf362808

View File

@@ -1,3 +1,7 @@
import java.time.Instant
import java.time.ZoneId
import java.time.format.DateTimeFormatter
buildscript { buildscript {
repositories { repositories {
mavenLocal() mavenLocal()
@@ -118,9 +122,7 @@ application {
ext { ext {
dockerTags = [project.version].with (true) { dockerTags = [project.version].with (true) {
if (!project.version.contains("-SNAPSHOT")) { add "t"+ DateTimeFormatter.ofPattern("yyyyMMddHHmm").withZone(ZoneId.of('UTC')).format(Instant.now())
add "latest"
}
} }
} }
@@ -128,7 +130,7 @@ jib {
from { from {
} }
to { to {
image = 'emeraldpay/dshackle' image = 'emeraldpay/dshackle:snapshot'
tags = dockerTags tags = dockerTags
} }
container { container {