I have a requirement of TFS workspace mapping or checkout using Jenkins pipeline. I have the below code but getting connection timeout issue.
stage ("Checkout"){
node("Nodename"){
ws("D:/Windows/Checkout/") {
echo ("Checking out source code")
checkout([$class: 'TeamFoundationServerScm', credentialsConfigurer: [$class: 'AutomaticCredentialsConfigurer'], projectPath: '$/ProjectName', serverUrl: 'CollectionURL', useOverwrite: true, useUpdate: true, workspaceName: 'Hudson-${JOB_NAME}'])}}
}
Any help or suggestion?