Need help setting up a pipeline on jenkins. It is necessary to run tests and collect logs in parallel, it worked out, but now there is another problem, the collection of logs is not completed. Maybe there is some method how to stop a task after another task is completed?
stage('Smoke Run') {
steps {
parallel(
first: {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh '$PYTHON -m pytest --testit android_tv/tests/smoke_run/ --clean-alluredir --alluredir=/Users/jenkins/allure-report/android-tv'
}
},
second: {
sh "$ADB logcat -c"
sh "$ADB logcat -> ~/jenkins/workspace/Android_TV_Smoke_Run/android_tv/tests/smoke_run/logs_tv/log.log"
}
)
}
}