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

JENKINS-49414 regression - build is not triggered when new branch is pushed with new commit(s)

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • bitbucket-plugin
    • None
    • Jenkins 2.315, Bitbucket Plugin 223.vd12f2bca5430

      I think this bug was caused by the change in https://issues.jenkins.io/browse/JENKINS-49414

       

      Preconditions: 

      1. Using Bitbucket plugin with setting "Build when a change is pushed to BitBucket"

      2. "Build on branch created" false (default)

       

      Problem / steps to reproduce:

      1. Create new branch locally
      2. Create commit to new branch
      3. Push new branch to origin

      with Bitbucket Plugin 223.vd12f2bca5430 -> Job is not triggered. Should be, because there's also new commit.

      with Bitbucket Plugin 1.1.29 -> Job is triggered

       

          [JENKINS-69670] JENKINS-49414 regression - build is not triggered when new branch is pushed with new commit(s)

          Jussi Aho added a comment -

          And because this new setting "Build on branch created" is still not available via jenkins DSL this is problematic and we need to still keep Bitbucket Plugin 1.1.29.

          Jussi Aho added a comment - And because this new setting "Build on branch created" is still not available via jenkins DSL this is problematic and we need to still keep Bitbucket Plugin 1.1.29.

          Tzach Solomon added a comment - - edited

          juaho 

          1. Does this still happen?
          2. Which type of job are trying to test? Freestyle/ pipeline?

           

          Please provide as much as info as possible

          Tzach Solomon added a comment - - edited juaho   1. Does this still happen? 2. Which type of job are trying to test? Freestyle/ pipeline?   Please provide as much as info as possible

          Jussi Aho added a comment -

          Yes, it still happens. We have pipelines, manually created freestyle jobs, and lot of automatically created freestyle jobs - which are the most problematic one because we can't enable "Build on branch created" feature using DSL: https://jenkinsci.github.io/job-dsl-plugin/ .

          My suggestion is that "Build on branch created" feature should be changed so that it affects only to new branches which are created & pushed without commits. When new branch is pushed with commits, it should always trigger build by default. (Now build is triggered only if you first push the new branch, and then push commits afterwards into that branch)

          Jussi Aho added a comment - Yes, it still happens. We have pipelines, manually created freestyle jobs, and lot of automatically created freestyle jobs - which are the most problematic one because we can't enable "Build on branch created" feature using DSL: https://jenkinsci.github.io/job-dsl-plugin/ . My suggestion is that "Build on branch created" feature should be changed so that it affects only to new branches which are created & pushed without commits. When new branch is pushed with commits, it should always trigger build by default. (Now build is triggered only if you first push the new branch, and then push commits afterwards into that branch)

          Tzach Solomon added a comment -

          juaho 

          Thanks for the quick response.
          I'll try to see what I can do ASAP to fix this issue.

          Tzach Solomon added a comment - juaho   Thanks for the quick response. I'll try to see what I can do ASAP to fix this issue.

            tzach_solomon Tzach Solomon
            juaho Jussi Aho
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: