feat(container): add floating latest tag when publishing images

This commit is contained in:
2023-11-16 11:27:10 +01:00
parent 758f37e8e4
commit f6d9255c5c
2 changed files with 21 additions and 3 deletions

View File

@ -44,19 +44,36 @@ String getBuildUser() {
}
String getProjectVersionDefaultChannel() {
return env.BRANCH_NAME.toLowerCase().replaceAll('(_|-| )+', '')
switch (env.BRANCH_NAME) {
case 'develop':
return 'develop'
case 'testing':
case 'staging':
return 'testing'
case 'stable':
case 'master':
return 'stable'
default:
return env.BRANCH_NAME.toLowerCase().replaceAll('(_|-| )+', '')
}
}
String getProjectVersionShortChannel(String channel) {
switch (channel) {
case 'develop':
return 'dev'
case 'testing':
case 'staging':
return 'tst'
case 'stable':
case 'master':
return 'stb'
default:
return channel.toLowerCase().replaceAll('(a|e|i|o|u|y_|-| )+', '').take(3)
}