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

PreBuildMerge --ff-only fails to send notification mails for non-ff branches

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None

      Consider a job is configured with

      • Branches to build: Branch specifier: for-master/**
      • Additional Behaviours
        • Merge before build
          • Branch to merge to: master
          • Fast-forward mode: --ff-only
        • Calculate changelog against a specific branch
          • Name of branch: master

      It is clearly possible, with this configuration, to calculate the changelog and thus identify who should receive failure notifications, even if the branch to build is not a fast-forward.

      This isn't done, though, so if someone pushes a branch for-master/foo that is not a fast-forward of master, then the job will fail with a message like this:

      ERROR: Branch not suitable for integration as it does not merge cleanly: Command "git merge --ff-only c33c4e240696ae203c257991ef4bfde9a939a4fa" returned status code 128:
      stdout: 
      stderr: fatal: Not possible to fast-forward, aborting.
      ...
      ...
      An attempt to send an e-mail to empty list of recipients, ignored.
      Finished: FAILURE
      

      The changelog should be computed before the branch merging so a notification can be sent out.

            Unassigned Unassigned
            tsondergaard tsondergaard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: