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

Cannot find any revision to build on clean workspace

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      GitHub pull request #18 of commit 486141bdb491f51b5d0bf0e3dc2a822b59ab755b automatically merged.
      Building on master in workspace /var/lib/jenkins/workspace/ghprb-test
      Cloning the remote Git repository
      Cloning repository https://github.com/tdiesler/fuse.git
      git --version
      git version 1.8.3.2
      ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            Hide
            cb372 cb372 added a comment -

            Unfortunately, this does not seem to be fixed (for me, at least) in 2.0.1.

            Steps to reproduce:

            1. Create a new job. Use a git repo with multiple branches. Set the 'Branches to build > Branch specifier' to a specific branch, e.g. 'feature/my-feature'

            2. Run a build

            Result:

            Building in workspace /var/lib/jenkins/main/jobs/JOB_NAME/workspace
            Fetching changes from the remote Git repository
            Fetching upstream changes from ssh://...REPO URL...
            ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
            Finished: FAILURE
            

            Notes:

            • the clone works fine if I don't specify a branch
            • even after a successful clone, if I edit the job config to specify a branch, it fails with the same error as above.

            I don't know much about the internals of the Git plugin, but it looks like it's not doing a fetch, so it doesn't know what remote branches are available.

            Show
            cb372 cb372 added a comment - Unfortunately, this does not seem to be fixed (for me, at least) in 2.0.1. Steps to reproduce: 1. Create a new job. Use a git repo with multiple branches. Set the 'Branches to build > Branch specifier' to a specific branch, e.g. 'feature/my-feature' 2. Run a build Result: Building in workspace /var/lib/jenkins/main/jobs/JOB_NAME/workspace Fetching changes from the remote Git repository Fetching upstream changes from ssh://...REPO URL... ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job. Finished: FAILURE Notes: the clone works fine if I don't specify a branch even after a successful clone, if I edit the job config to specify a branch, it fails with the same error as above. I don't know much about the internals of the Git plugin, but it looks like it's not doing a fetch, so it doesn't know what remote branches are available.
            Hide
            cb372 cb372 added a comment -

            Found a workaround:

            1. Leave the 'Branches to build > Branch specifier' field blank

            2. Click the Advanced button, and set a custom refspec:

            +refs/heads/feature/my-feature:refs/remotes/origin/feature/my-feature
            

            With these settings, the plugin will correctly perform a fetch and then check out only the 'feature/my-feature' branch.

            Show
            cb372 cb372 added a comment - Found a workaround: 1. Leave the 'Branches to build > Branch specifier' field blank 2. Click the Advanced button, and set a custom refspec: +refs/heads/feature/my-feature:refs/remotes/origin/feature/my-feature With these settings, the plugin will correctly perform a fetch and then check out only the 'feature/my-feature' branch.
            Hide
            davidvo David Vo added a comment -

            One small suggestion that worked for me - did you see if your Git plugin was "pinned" (to a previous version) after you upgraded to 2.0.1? I upgraded the plugin and thought I was good to go but as soon as I unpinned it, it worked. I clean the workspace before each build and I no longer see the error above.

            Show
            davidvo David Vo added a comment - One small suggestion that worked for me - did you see if your Git plugin was "pinned" (to a previous version) after you upgraded to 2.0.1? I upgraded the plugin and thought I was good to go but as soon as I unpinned it, it worked. I clean the workspace before each build and I no longer see the error above.
            Hide
            cb372 cb372 added a comment -

            @David Vo, thanks for the tip, but the version is not pinned. It's definitely running version 2.0.1.

            Show
            cb372 cb372 added a comment - @David Vo, thanks for the tip, but the version is not pinned. It's definitely running version 2.0.1.
            Hide
            markewaite Mark Waite added a comment -

            The git-client-plugin 1.10.0 supports refs/remotes/origin/master as a way to fully qualify the reference to the origin/master branch. Refer to the online help and to JENKINS-20767 for more information.

            Show
            markewaite Mark Waite added a comment - The git-client-plugin 1.10.0 supports refs/remotes/origin/master as a way to fully qualify the reference to the origin/master branch. Refer to the online help and to JENKINS-20767 for more information.

              People

              • Assignee:
                ndeloof Nicolas De Loof
                Reporter:
                tdiesler Thomas Diesler
              • Votes:
                6 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: