Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-35340

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

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Not A Defect
    • Icon: Major Major
    • git-plugin
    • Jenkins ver. 1651.2, Ubuntu 12.04, VirtualBox, Git-Plugin, Firefox

      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

            markewaite Mark Waite
            fep92 Freddy Paxton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: