From 0c572eee129399800423a4d82389b4162b5c0235 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Fri, 29 Apr 2022 06:20:24 -0400 Subject: [PATCH] Revert "Remove Launchable until they fix their module (#303)" This reverts commit e0e8ef505f494a9d7b2dee1d3371ee43c12004bc. The problem that caused it to be reverted has been corrected upstream. Skip-PR-comments: true Signed-off-by: Brian J. Murrell --- vars/functionalTest.groovy | 9 +++++++++ vars/functionalTestPostV2.groovy | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/vars/functionalTest.groovy b/vars/functionalTest.groovy index 61d3825c2..352adea3f 100755 --- a/vars/functionalTest.groovy +++ b/vars/functionalTest.groovy @@ -87,6 +87,15 @@ def call(Map config = [:]) { params['context'] = context params['description'] = description + sh label: "Install Launchable", + script: "pip3 install --user --upgrade launchable~=1.0" + + withCredentials([string(credentialsId: 'launchable-test', variable: 'LAUNCHABLE_TOKEN')]) { + sh label: "Send build data", + script: '''export PATH=$PATH:$HOME/.local/bin + launchable record build --name ${BUILD_TAG//%2F/-} --source src=.''' + } + if (config.get('test_function', "runTestFunctional") == "runTestFunctionalV2") { runTestFunctionalV2 params diff --git a/vars/functionalTestPostV2.groovy b/vars/functionalTestPostV2.groovy index f61180bbf..c6dbe8e15 100755 --- a/vars/functionalTestPostV2.groovy +++ b/vars/functionalTestPostV2.groovy @@ -35,4 +35,15 @@ def call(Map config = [:]) { junit testResults: junit_results + sh label: "Install Launchable", + script: "pip3 install --user --upgrade launchable~=1.0" + + withCredentials([string(credentialsId: 'launchable-test', variable: 'LAUNCHABLE_TOKEN')]) { + sh label: "Submit test results to Launchable", + script: 'if ls -l ' + '"' + env.STAGE_NAME + '''"/*/*/xunit1_results.xml 2>/dev/null; then + export PATH=$PATH:$HOME/.local/bin + launchable record tests --build ${BUILD_TAG//%2F/-} pytest ''' + + '"' + env.STAGE_NAME + '''"/*/*/xunit1_results.xml + fi''' + } }