0
votes

I am pretty new in Jenkins and continuous integration.Here I mentioned the problem I faced while using groovy in Pipe line.

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. ERROR: script returned exit code 1 Finished: FAILURE

1

1 Answers

0
votes

Here is code to checkout files from TFS from within the Jenkins pipeline script:

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}'])