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

"Ignore rebuilding merge branches" suppresses build in master branch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins 2.204.2 LTS in Kubernetes (via helm chart)
      basic-branch-build-strategies 1.3.2
      branch-api 2.5.5
      cloudbees-bitbucket-branch-source 2.7.0
      multibranch-build-strategy-extension 1.0.10

      Bitbucket Server on Premise

      We use multi branch pipeline jobs with Bitbucket branch source, setup to

      • detect branches
        • ignore branches that have pull requests
      • detect pull requests
        • merge with target branch

      I added the "Change Requests" build strategy, and set the option "Ignore rebuilding merge branches when only the target branch changed". Now when merging a Pull Request, no build is triggered, not even in the master branch. The behaviour I wanted was, that other open pull requests are not rebuilt.

      Here is a log of the repository scan. PR-7 was open, targeting master. PR-8 was merged into master.

      [Tue Feb 11 11:46:51 CET 2020] Starting branch indexing...
      Connecting to https://work.inxmail.com/stash using jenkins_stash/****** (Jenkins User for accessing Bitbucket Server (Stash))
      Repository type: Git
      Looking up DEVSAMPLE/jenkins-kubernetes-agent-demo for branches
      Checking branch master from DEVSAMPLE/jenkins-kubernetes-agent-demo
            ‘Jenkinsfile’ found
          Met criteria
      Changes detected: master (3bd9703923e01db05b6085092c21299dbd548374 → b3ca516091e0a7679596df02fce07e4c56a718e9)
      No automatic build triggered for master
      Checking branch spring-boot-upgrade from DEVSAMPLE/jenkins-kubernetes-agent-demo
      
        2 branches were processed
      Looking up DEVSAMPLE/jenkins-kubernetes-agent-demo for pull requests
      Checking PR-7 from DEVSAMPLE/jenkins-kubernetes-agent-demo and branch spring-boot-upgrade
            ‘Jenkinsfile’ found
          Met criteria
      Changes detected: PR-7 (6ce4bbac8f2279869753e1285f9fe45df20754bf+3bd9703923e01db05b6085092c21299dbd548374 → 6ce4bbac8f2279869753e1285f9fe45df20754bf+b3ca516091e0a7679596df02fce07e4c56a718e9)
      No automatic build triggered for PR-7
      
        1 pull requests were processed
      [Tue Feb 11 11:46:52 CET 2020] Finished branch indexing. Indexing took 0.76 sec
      Evaluating orphaned items in ZZ: Experimentierbereich » jenkins-kubernetes-agent-demo
      Will remove PR-8
      Finished: SUCCESS
      

            Unassigned Unassigned
            rainerfrey Rainer Frey
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: