Jenkins pipeline script to checkout code from CVS repo

560 views
Skip to first unread message

Ajeet Singh

unread,
May 4, 2017, 6:31:27 AM5/4/17
to Jenkins Developers
Dear All,
how can i checkout code from CVS repository in jenkins pipeline script

git example is given blow , please help me to checkout code from cvs repo.

i seem cvs and git example on blow link , but its not working 


 

node {
   def mvnHome
   stage('checkout'){
       git url: 'https://ada.hph.com/bitbucket/scm/ter/testrepo.git'
       
       mvnHome= "/opt/maven/apache-maven-2.0.9"
   }
stage('Build') {
      // Run the maven build
      if (isUnix()) {
         sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean"
      } else {
         bat(/"${mvnHome}\bin\mvn" -Dmaven.test.failure.ignore clean package/)
      }
   }
}

Björn Pedersen

unread,
May 4, 2017, 10:43:50 AM5/4/17
to Jenkins Developers
The snippet generator is your friend:

 use  "checkout: General SCM"  there.

Björn

PS: Normally such question belong to the jenkins-users list.
Reply all
Reply to author
Forward
0 new messages