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

Git plugin should fail build when fetch fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • git-plugin
    • None
    • hudson version 337 (slave.jar also)
      git version 1.6.3.2
      git plugin version 0.7.3

      The uid on our origin repository's user changed unexpectedly so that the user no longer owned his own home dir. When the slave tried to fetch from the repository using certificates (worked in the past) the certificate failed and git/ssh prompted for password. It failed (no tty, of course) and then the build continued without updating the code. It reported a success at the end. The build should have aborted immediately.

      Matrix build - master job
      Started by user gerhard
      Building remotely on hudson-206
      Checkout:3.0.2 / /usr/home/hudson/workspace/3.0.2 - hudson.remoting.Channel@10098b:hudson-206
      Last Build : #18
      Last Built Revision: Revision a2060dc86752c432eae0b81eb34ca18b0b5b858e (origin/3.0.1 )
      Checkout:3.0.2 / /usr/home/hudson/workspace/3.0.2 - hudson.remoting.LocalChannel@7a44e5
      Fetching changes from the remote Git repository
      Fetching upstream changes from ssh://hudson@gaia/git/Main.git
      [3.0.2] $ git fetch ssh://hudson@gaia/git/Main.git +refs/heads/*:refs/remotes/origin/*
      Permission denied, please try again.
      Permission denied, please try again.
      Permission denied (publickey,password).
      fatal: The remote end hung up unexpectedly
      ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
      Seen branch in repository origin/3.0
      Seen branch in repository origin/next.major
      Seen branch in repository origin/next.minor
      Seen branch in repository origin/master
      Seen branch in repository origin/3.0.1
      Seen branch in repository origin/next.point
      Commencing build of Revision a2060dc86752c432eae0b81eb34ca18b0b5b858e (origin/3.0.1 )
      Checking out Revision a2060dc86752c432eae0b81eb34ca18b0b5b858e (origin/3.0.1 )
      [3.0.2] $ git checkout -f a2060dc86752c432eae0b81eb34ca18b0b5b858e
      [3.0.2] $ git tag -a -f -m "Hudson Build #19" hudson-3.0.2-19
      Recording changes in branch origin/3.0.1
      [3.0.2] $ git log --numstat -M --summary --pretty=raw a2060dc86752c432eae0b81eb34ca18b0b5b858e..a2060dc86752c432eae0b81eb34ca18b0b5b858e
      Triggering blah-3.0
      Triggering bleh-3.0
      Finished: SUCCESS
      

            abayer Andrew Bayer
            jlongman jlongman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: