ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

798 views
Skip to first unread message

Oscar Vadillo

unread,
Oct 27, 2016, 11:56:23 AM10/27/16
to Jenkins Users
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: "g...@bitbucket.org: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 g...@bitbucket.org:mycompany/myrepo.git # timeout=10
Fetching upstream changes from g...@bitbucket.org:mycompany/myrepo.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress g...@bitbucket.org: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


Indra Gunawan (ingunawa)

unread,
Oct 27, 2016, 3:04:26 PM10/27/16
to jenkins...@googlegroups.com
DOn’t you need to cd to “myrepo” directory in the workspace before using “git checkout” git cli with sh?

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/34f3b584-5d9f-425e-a702-4a3bebf53b04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oscar Vadillo

unread,
Oct 27, 2016, 6:03:08 PM10/27/16
to Jenkins Users, ingu...@cisco.com
Thanks, but that's not the problem. The error appear only with the first command line:

git url: "g...@bitbucket.org:mycompany/myrepo.git"

Any idea about it? Thanks

Oscar Vadillo

unread,
Oct 28, 2016, 11:42:02 AM10/28/16
to jenkins...@googlegroups.com

I dont understand. Last month the same scenary works succesfully. I didn't change anything in the Jenkins pipeline script. 😞


You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/Zbg2MXZYCZE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5cb2a7b4-ebbb-457d-bf7c-41261b724260%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages