From 47bf3628080525f3e2e1d77624a13f4cbe2dbdec Mon Sep 17 00:00:00 2001 From: Igor Artamonov Date: Wed, 7 Aug 2019 23:08:08 -0400 Subject: [PATCH] problem: uploads development snapshots as :latest --- build.gradle | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 20e5e9dd..ac4121e9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,7 @@ +import java.time.Instant +import java.time.ZoneId +import java.time.format.DateTimeFormatter + buildscript { repositories { mavenLocal() @@ -118,9 +122,7 @@ application { ext { dockerTags = [project.version].with (true) { - if (!project.version.contains("-SNAPSHOT")) { - add "latest" - } + add "t"+ DateTimeFormatter.ofPattern("yyyyMMddHHmm").withZone(ZoneId.of('UTC')).format(Instant.now()) } } @@ -128,7 +130,7 @@ jib { from { } to { - image = 'emeraldpay/dshackle' + image = 'emeraldpay/dshackle:snapshot' tags = dockerTags } container {