DOn't you need to cd to "myrepo" directory in the workspace before using "git checkout" git cli with sh?
From: <[email protected]<mailto:[email protected]>> on behalf of Oscar Vadillo <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Thursday, October 27, 2016 at 8:56 AM To: Jenkins Users <[email protected]<mailto:[email protected]>> Subject: ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job. Hi all, I am trying to use Jenkins in Pipeline mode. For that, I have defined a fist step which I make a git checkout to my repo. git url: "[email protected]<mailto:[email protected]>:mycompany/myrepo.git" sh "git checkout tags/1.2.1" But, when I run the Groovy script, appear this error: [Pipeline] stage (Getting Source Code) Entering stage Getting Source Code Proceeding [Pipeline] pwd [Pipeline] git > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url > [email protected]<mailto:[email protected]>:mycompany/myrepo.git # > timeout=10 Fetching upstream changes from [email protected]<mailto:[email protected]>:mycompany/myrepo.git > git --version # timeout=10 > git -c core.askpass=true fetch --tags --progress > [email protected]<mailto:[email protected]>:mycompany/myrepo.git > +refs/heads/*:refs/remotes/origin/* > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 > git rev-parse origin/master^{commit} # timeout=10 [Pipeline] } $ docker stop aa4f43fdb526e9771f972f09bf80df03e3b7c82076697b539e3f2d0402dd9f0b $ docker rm -f aa4f43fdb526e9771f972f09bf80df03e3b7c82076697b539e3f2d0402dd9f0b [Pipeline] // withDockerContainer [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job. Finished: FAILURE Any idea? Thanks in advance Oscar -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/34f3b584-5d9f-425e-a702-4a3bebf53b04%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/34f3b584-5d9f-425e-a702-4a3bebf53b04%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/D4379D65.5F117%25ingunawa%40cisco.com. For more options, visit https://groups.google.com/d/optout.
