[JIRA] [git-plugin] (JENKINS-35340) ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

4 views
Skip to first unread message

freddy.paxton1@hotmail.co.uk (JIRA)

unread,
Jun 3, 2016, 1:36:04 PM6/3/16
to jenkinsc...@googlegroups.com
Freddy Paxton created an issue
 
Jenkins / Task JENKINS-35340
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Issue Type: Task Task
Assignee: Mark Waite
Components: git-plugin
Created: 2016/Jun/03 5:35 PM
Environment: Jenkins ver. 1651.2, Ubuntu 12.04, VirtualBox, Git-Plugin, Firefox
Labels: git jenkins ubuntu java
Priority: Major Major
Reporter: Freddy Paxton

I'm new to Jenkins, Ubuntu and Git so the answer to this is probably something I've missed out!

What I want to do is set up a Git repository in which 2 Java files are located (HelloWorld.java and HelloWorldErr.java - HelloWorldErr is missing an ; ). This is to test the Jenkins build and test system to see if it can successfully compile the HelloWorld.java file and run it, and also discover the error in HelloWorldErr.java. It's a pretty simple test but I'm having trouble getting it working.

After finally managing to set up the repository correctly, I now get an error saying:
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

After scouting the internet for tutorials and/or anyone with similar problems I'm still looking for a solution. Even an explanation of the process would probably help me a lot.

My repository is located at /var/lib/jenkins/repo/test_repo.git/ and the 2 Java files are in there. I left the branch specifier as */master as I do not know what this does.

In my Execute shell command I have:

javac HelloWorld.java
java HelloWorld
Obviously this means that it is not looking at HelloWorldErr.java but for now I just want the build to run successfully.

Sorry if I haven't explained myself very well. Once I get this working I am also planning to test running files through GitHub but I do not want to start on that before I can get the local Git working correctly.

Thanks in advance! Any insight on this is going to really help me with my project.

If it helps here is the console output with branch set to */master...
Building in workspace /var/lib/jenkins/jobs/HelloWorld/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url file:///var/lib/jenkins/repo/test_repo.git # timeout=10
Fetching upstream changes from file:///var/lib/jenkins/repo/test_repo.git
> git --version # timeout=10
> git -c core.askpass=true fetch --tags --progress file:///var/lib/jenkins/repo/test_repo.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
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

And here is the output when I leave branch blank...
Building in workspace /var/lib/jenkins/jobs/HelloWorld/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url file:///var/lib/jenkins/repo/test_repo.git # timeout=10
Fetching upstream changes from file:///var/lib/jenkins/repo/test_repo.git
> git --version # timeout=10
> git -c core.askpass=true fetch --tags --progress file:///var/lib/jenkins/repo/test_repo.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

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

freddy.paxton1@hotmail.co.uk (JIRA)

unread,
Jun 3, 2016, 1:46:03 PM6/3/16
to jenkinsc...@googlegroups.com

freddy.paxton1@hotmail.co.uk (JIRA)

unread,
Jun 3, 2016, 1:47:01 PM6/3/16
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Jun 3, 2016, 2:28:01 PM6/3/16
to jenkinsc...@googlegroups.com
Mark Waite resolved as Not A Defect
 

Freddy Paxton welcome to Jenkins. Glad to have you learning.

We find it is much more effective for new user questions to be raised on the Jenkins mailing list rather than being raised as bug reports. Could you bring your questions to the mailing list so that you can have the benefit of help from many more people than just the maintainer of the git plugin?

In your specific case, you may want to watch the screencast I created a few years ago called "Jenkins in Five Minutes".

You may also want to consider learning about "ant" or "maven" or "gradle" as tools that can help you compile your software.

Alternately, you could open a free Java integrated development environment (Netbeans is the one I use, others use Eclipse) and use it to create a project for your HelloWorld test.

Change By: Mark Waite
Status: Open Resolved
Resolution: Not A Defect

freddy.paxton1@hotmail.co.uk (JIRA)

unread,
Jun 3, 2016, 2:45:01 PM6/3/16
to jenkinsc...@googlegroups.com
Freddy Paxton commented on Task JENKINS-35340
 
Re: ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

Sorry Mark, I think I have now posted in the correct place. Is it the Google group for Jenkins Users?

mark.earl.waite@gmail.com (JIRA)

unread,
Jun 3, 2016, 4:52:02 PM6/3/16
to jenkinsc...@googlegroups.com

That was exactly the correct location, and I was very glad to see that someone already responded with answers to your questions. The Jenkins community tends to be very helpful to new users.

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 22, 2019, 9:34:20 PM10/22/19
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Not A Defect
 
Change By: Mark Waite
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages