do not push docker tag without patch version (#202)

This commit is contained in:
a10zn8
2023-04-12 17:28:52 +04:00
committed by GitHub
parent 7fc78dea09
commit 75c6deb6a0

View File

@@ -164,9 +164,8 @@ jib {
// by default publish as: // by default publish as:
// dshackle:shapshot, // dshackle:shapshot,
// dshackle:t<yyyyMMddHHmm>, // dshackle:t<yyyyMMddHHmm>,
// dshackle:<versionFull> and // dshackle:<versionFull>
// dshackle:<versionMajor.versionMinor> // dshackle:latest
// dshackle:latest only when publishing first version with zero patch (ex. 1.2.0)
image = [ image = [
project.hasProperty('docker') ? project.property('docker') : 'emeraldpay', project.hasProperty('docker') ? project.property('docker') : 'emeraldpay',
'/dshackle:', '/dshackle:',
@@ -174,7 +173,6 @@ jib {
].join('') ].join('')
tags = [project.version].with(true) { tags = [project.version].with(true) {
add "t" + DateTimeFormatter.ofPattern("yyyyMMddHHmm").withZone(ZoneId.of('UTC')).format(Instant.now()) add "t" + DateTimeFormatter.ofPattern("yyyyMMddHHmm").withZone(ZoneId.of('UTC')).format(Instant.now())
add project.version.toString().replaceAll('(\\d+\\.\\d+).+', '$1')
add "latest" add "latest"
} }
auth { auth {