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

Git plugin will not build a project with an empty repo

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • git-plugin
    • None
    • Jenkins 2.75
      Git Plugin 3.5.1

      The SCM change tracker does not handle empty repos in the expected way. It finds finds changes, and then starts a build, which fails, as there is no branch to pull and then build.

       

      Expected Behavior: No changes detected on a bare repo, and no build started.

       

      Log of SCM run (company name redacted)

      Started on Sep 19, 2017 8:26:00 AM
      Using strategy: Default
      > git ls-remote -h git@bitbucket.org:***/guide.backendbucket.sueffa.git # timeout=10
      Unexpected ls-remote output line ''
      [poll] Couldn't get remote head revision
      Done. Took 3.9 sec
      Changes found

       

      Log of Build (company name redacted):
      Started by an SCM change
      Building in workspace /mnt/storage/jenkins/workspace/backendbucket.sueffa sync (integration)
      > git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
      > git config remote.origin.url git@bitbucket.org:***/guide.backendbucket.sueffa.git # timeout=10
      Fetching upstream changes from git@bitbucket.org:***/guide.backendbucket.sueffa.git
      > git --version # timeout=10
      > git fetch --tags --progress git@bitbucket.org:**/guide.backendbucket.sueffa.git +refs/heads/:refs/remotes/origin/*
      > git rev-parse refs/remotes/origin/integration^{commit} # timeout=10
      > git rev-parse refs/remotes/origin/origin/integration^{commit} # timeout=10
      > git rev-parse origin/integration^{commit} # timeout=10
      ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
      Notified JIRA that a build has completed.
      Finished: FAILURE

            Unassigned Unassigned
            ckirschner Carsten Kirschner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: