problem: uploads development snapshots as :latest
This commit is contained in:
10
build.gradle
10
build.gradle
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user