Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins build failed with Revision error

I was trying to run Jenkins on a simple Python test. It's my first time, so I followed steps mentioned in this tutorial : Link

My Jenkins console output after I triggered build shows that it failed because it couldn't find any revision.

Here is the console output :

Started by user anonymous
Building in workspace    /usr/share/tomcat7/.jenkins/jobs/PythonUIProject/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url /home/rahul/PycharmProjects/.git/ # timeout=10
Fetching upstream changes from /home/rahul/PycharmProjects/.git/
> git --version # timeout=10
> git -c core.askpass=true fetch --tags --progress /home/rahul/PycharmProjects/.git/ +refs/heads/*:refs/remotes/origin/*


Seen 0 remote branches
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

My Git installation folder is : home/rahul/PycharmProjects/, and my system is a Ubuntu 14.04 LTS.

I tried changing the Branches to Build under the Source Code Management configuration to be ** in place of */master as a workaround but it didn't work.

Has anybody worked on this before? What should be the solution to this.

Edit 1 : As per suggestions I tried using the git push to push the code, but I am getting this :

  rahul@oneplusone:~/PycharmProjects$ git push -u /home/rahul/PycharmProjects/.git master
  error: src refspec master does not match any.
  error: failed to push some refs to '/home/rahul/PycharmProjects/.git'
like image 269
demouser123 Avatar asked Nov 09 '22 19:11

demouser123


1 Answers

Make sure your branches have been pushed up. Failing that, you can try to remove the '*/' from your branch (just use master instead of */master)

like image 173
tuck Avatar answered Nov 14 '22 23:11

tuck