0

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

Philipp Maurer
  • 2,480
  • 6
  • 18
  • 25
Sumanta Mondal
  • 171
  • 2
  • 4

1 Answers1

0

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}'])
Isaiah4110
  • 9,855
  • 1
  • 40
  • 56