Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions vars/functionalTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions vars/functionalTestPostV2.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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'''
}
}