From c9ca6833248e7bb842d503c81c09e8c19aa5b36d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 6 Nov 2023 16:45:43 +0100 Subject: [PATCH] ci: default to using nightly build for QA PR builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ci/Jenkinsfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 93eb309..5ed6479 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -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 += "${key}: ${val}
\n" } return text } + +def getDefaultBuildSource() { + if (JOB_NAME ==~ 'status-desktop/qa-automation/prs/.*') { + return 'status-desktop/nightly' + } + return '' +}