ci: fix filename parsing, add sane fallback (#296)

Depends on:
https://github.com/status-im/status-jenkins-lib/pull/79

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-11-10 14:00:52 +01:00 committed by GitHub
parent c198bad7eb
commit fcc423849b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

6
ci/Jenkinsfile vendored
View File

@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.0'
library 'status-jenkins-lib@v1.8.1'
pipeline {
@ -178,6 +178,10 @@ def setNewBuildName() {
def setBuildDescFromFile(fileNameOrPath) {
def tokens = utils.parseFilename(utils.baseName(fileNameOrPath))
if (tokens == null) { /* Fallback for regex fail. */
currentBuild.description = utils.baseName(fileNameOrPath)
return
}
if (tokens.build.startsWith('pr')) {
currentBuild.displayName = tokens.build.replace(/^pr/, 'PR-')
}