ci: default to using nightly build for QA PR builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
4a181ccf4c
commit
791ff10114
|
@ -23,7 +23,7 @@ pipeline {
|
||||||
string(
|
string(
|
||||||
name: 'BUILD_SOURCE',
|
name: 'BUILD_SOURCE',
|
||||||
description: 'URL to tar.gz file OR path to Jenkins build.',
|
description: 'URL to tar.gz file OR path to Jenkins build.',
|
||||||
defaultValue: ''
|
defaultValue: getDefaultBuildSource()
|
||||||
)
|
)
|
||||||
string(
|
string(
|
||||||
name: 'TEST_NAME',
|
name: 'TEST_NAME',
|
||||||
|
@ -168,6 +168,10 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
def setNewBuildName() {
|
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. */
|
/* For URLs we need to parse the filename to get attributes. */
|
||||||
if (params.BUILD_SOURCE.startsWith('http')) {
|
if (params.BUILD_SOURCE.startsWith('http')) {
|
||||||
def tokens = utils.parseFilename(utils.baseName(params.BUILD_SOURCE))
|
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" }
|
data.each { key, val -> text += "<b>${key}</b>: ${val}</a><br>\n" }
|
||||||
return text
|
return text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def getDefaultBuildSource() {
|
||||||
|
if (JOB_NAME ==~ 'status-desktop/qa-automation/prs/.*') {
|
||||||
|
return 'status-desktop/nightly'
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue