Hey,
What is the right way to redirect the stacktrace so that a user can see in the console log?
I have this snippet:
{{ try { }} {{ checkout([$class: 'SubversionSCM', additionalCredentials: [], excludedCommitMessages: '', excludedRegions: '', excludedRevprop: '', excludedUsers: '', filterChangelog: false, ignoreDirPropChanges: false, includedRegions: '', locations: [[cancelProcessOnExternalsFail: true, credentialsId: 'nirdevadm', depthOption: 'infinity', ignoreExternalsOption: true, local: '.', remote: "${params.branch}@${params.revision}"], [cancelProcessOnExternalsFail: true, credentialsId: 'bgqatest', depthOption: 'infinity', ignoreExternalsOption: true, local: 'gradle', remote: "${external}"]], quietOperation: false, workspaceUpdater: [$class: 'CheckoutUpdater']]) }} {{ } catch (Throwable ex) { }} {{ echo 'Caught Throwable. Retrying operation...' }} {{ echo 'Exception message: ' + ex.getMessage() }} {{ ex.printStackTrace() }} {{ retry(5) { }} {{ checkout([$class: 'SubversionSCM', additionalCredentials: [], excludedCommitMessages: '', excludedRegions: '', excludedRevprop: '', excludedUsers: '', filterChangelog: false, ignoreDirPropChanges: false, includedRegions: '', locations: [[cancelProcessOnExternalsFail: true, credentialsId: 'nirdevadm', depthOption: 'infinity', ignoreExternalsOption: true, local: '.', remote: "${params.branch}@${params.revision}"], [cancelProcessOnExternalsFail: true, credentialsId: 'bgqatest', depthOption: 'infinity', ignoreExternalsOption: true, local: 'gradle', remote: "${external}"]], quietOperation: false, workspaceUpdater: [$class: 'CheckoutUpdater']]) }} {{ } }} {{ } }}
But I cannot see the stacktrace as it goes in the error stream that I do not see in the console build log.
Is there a way to copy this info to the console log?
(My use case: I have many SVN checkout issues and I would like to be able to retry the checkout only when I get SVN related exceptions) |
|