From fd95aa48682d6c1bf169ef8391fcc7322f89046c Mon Sep 17 00:00:00 2001 From: Igor Artamonov Date: Fri, 13 Sep 2019 14:18:39 -0400 Subject: [PATCH] solution: skip timestamp tag for release dockers --- build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 32d020da..d6a33639 100644 --- a/build.gradle +++ b/build.gradle @@ -134,7 +134,9 @@ jib { (project.hasProperty('latest') && project.property('latest') == 'true') ? 'latest' : 'snapshot' ].join('') tags = [project.version].with (true) { - add "t"+ DateTimeFormatter.ofPattern("yyyyMMddHHmm").withZone(ZoneId.of('UTC')).format(Instant.now()) + if (!project.hasProperty('latest') || project.property('latest') != 'true') { + add "t"+ DateTimeFormatter.ofPattern("yyyyMMddHHmm").withZone(ZoneId.of('UTC')).format(Instant.now()) + } add project.version.toString().replaceAll('(\\d+\\.\\d+).+', '$1') } }