ci: handle nightly build naming better

Nightly builds just don't provide enough info in the path itself.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-10-27 00:51:27 +02:00
parent 0219df1eba
commit b25cbb5ce3
1 changed files with 7 additions and 2 deletions

View File

@ -170,7 +170,7 @@ def setNewBuildName() {
/* For URLs we need to parse the filename to get attributes. */
if (params.BUILD_SOURCE.startsWith('http')) {
def tokens = utils.parseFilename(utils.baseName(params.BUILD_SOURCE))
currentBuild.displayName = tokens.build
currentBuild.displayName = tokens.build.replace(/^pr/, 'PR-')
currentBuild.description = formatMap([
Node: NODE_NAME,
Build: tokens.build,
@ -178,7 +178,12 @@ def setNewBuildName() {
Version: (tokens.tstamp ?: tokens.version),
])
} else {
currentBuild.displayName = utils.baseName(params.BUILD_SOURCE).replace(/^pr/, 'PR-')
def parent = utils.parentOrCurrentBuild()
if (!(parent.getFullDisplayName() ==~ /prs/)) {
currentBuild.displayName = parent.getFullDisplayName().minus('status-desktop » ')
} else {
currentBuild.displayName = utils.baseName(params.BUILD_SOURCE)
}
currentBuild.description = formatMap([
Node: NODE_NAME,
Build: params.BUILD_SOURCE.minus('status-desktop/'),