solution: docker tag with current minor version

This commit is contained in:
Igor Artamonov
2019-08-28 13:23:52 -04:00
parent 801a2fe4f8
commit 771618cf5b

View File

@@ -125,14 +125,12 @@ jib {
from {
}
to {
image = 'emeraldpay/dshackle:snapshot'
// execute with -Platest=true
// $ gradle jib -Platest=true
image = (project.hasProperty('latest') && project.property('latest') == 'true') ? 'emeraldpay/dshackle:latest' : 'emeraldpay/dshackle:snapshot'
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"
}
add project.version.toString().replaceAll('(\\d+\\.\\d+).+', '$1')
}
}
container {