From 791ff10114207fbc8db52447d13d512a6601621b 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 --- test/e2e/ci/Jenkinsfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/e2e/ci/Jenkinsfile b/test/e2e/ci/Jenkinsfile index 93eb309de4..5ed6479c3d 100644 --- a/test/e2e/ci/Jenkinsfile +++ b/test/e2e/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 '' +}