ci: update build name to be more descriptive
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
57e934fad5
commit
3ad2f3ff92
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.13'
|
||||
library 'status-jenkins-lib@v1.8.0'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
@ -75,6 +75,7 @@ pipeline {
|
|||
stages {
|
||||
stage('Setup') {
|
||||
steps { script {
|
||||
currentBuild.displayName = getNewBuildName()
|
||||
sh 'pip3 install --user -r requirements.txt'
|
||||
} }
|
||||
}
|
||||
|
@ -157,3 +158,15 @@ pipeline {
|
|||
cleanup { cleanWs() }
|
||||
}
|
||||
}
|
||||
|
||||
def getNewBuildName() {
|
||||
/* 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))
|
||||
return [
|
||||
(tokens.tstamp ?: tokens.version), tokens.commit, tokens.build
|
||||
].grep().join('-')
|
||||
} else {
|
||||
return utils.baseName(params.BUILD_SOURCE)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue