[英]Jenkins pipeline script to checkout code from tfs with credential
I am pretty new in Jenkins and continuous integration.Here I mentioned the problem I faced while using groovy in Pipe line. 我在Jenkins和持续集成方面还很新,在这里我提到了在Pipe line中使用groovy时遇到的问题。
node('node-name')
{
stage 'Checkout code'
bat 'http://devtfsappd00.avi.com:8080/tfs/Example_DevCollection'
}
Just a very basic pipeline script. 只是一个非常基本的管道脚本。 Which says :
上面说:
'http:' is not recognized as an internal or external command, operable program or batch file.
无法将“ http:”识别为内部或外部命令,可操作程序或批处理文件。 ERROR: script returned exit code 1 Finished: FAILURE
错误:脚本返回退出代码1完成:失败
以下是从Jenkins管道脚本中从TFS检出文件的代码:
checkout([$class: 'TeamFoundationServerScm', credentialsConfigurer: [$class: 'AutomaticCredentialsConfigurer'], projectPath: '$/TFS/Server_Path', serverUrl: 'http://tfs-server-url/', useOverwrite: true, useUpdate: true, workspaceName: 'Hudson-${JOB_NAME}-${NODE_NAME}'])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.