[英]How to checkout and run pipeline file from TFS on specific node in Jenkins?
[英]Jenkins pipeline script to checkout code from tfs with credential
我在Jenkins和持續集成方面還很新,在這里我提到了在Pipe line中使用groovy時遇到的問題。
node('node-name')
{
stage 'Checkout code'
bat 'http://devtfsappd00.avi.com:8080/tfs/Example_DevCollection'
}
只是一個非常基本的管道腳本。 上面說:
無法將“ http:”識別為內部或外部命令,可操作程序或批處理文件。 錯誤:腳本返回退出代碼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.