ci: default to using nightly build for QA PR builds

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-11-06 16:45:43 +01:00
parent 4a181ccf4c
commit 791ff10114
1 changed files with 12 additions and 1 deletions

View File

@ -23,7 +23,7 @@ pipeline {
string(
name: 'BUILD_SOURCE',
description: 'URL to tar.gz file OR path to Jenkins build.',
defaultValue: ''
defaultValue: getDefaultBuildSource()
)
string(
name: 'TEST_NAME',
@ -168,6 +168,10 @@ pipeline {
}
def setNewBuildName() {
/* Skip PR builds for QA automation repo. */
if (JOB_BASE_NAME == 'prs') {
return
}
/* 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))
@ -208,3 +212,10 @@ def formatMap(Map data=[:]) {
data.each { key, val -> text += "<b>${key}</b>: ${val}</a><br>\n" }
return text
}
def getDefaultBuildSource() {
if (JOB_NAME ==~ 'status-desktop/qa-automation/prs/.*') {
return 'status-desktop/nightly'
}
return ''
}