4

I have set git post-commit hook which triggers scan on my Multibranch Pipeline. This scan detects changes (new commit) but do not triggers building job for changed branch.

Scan Multibranch Pipeline Log

Branch indexing

... git messages ...

Checking branches...
  Checking branch develop
      ‘Jenkinsfile’ found
    Met criteria
No changes detected: develop (still at 5ed9c9a76ef81bf023c1ea89c7515458e8ac548d)
  Checking branch master
      ‘Jenkinsfile’ found
    Met criteria
No changes detected: master (still at c9ac551806eb5a90dccf093e58c907f330407b9b)
  Checking branch feature/Model
      ‘Jenkinsfile’ found
    Met criteria
Changes detected: feature/Model (2e5a898498e138737941a907969eb80ee533a900 → b931de01b1f8dd51a2646f109b185592ea941f7f)
Did not schedule build for branch: feature/Model
Processed 3 branches
...
Finished: SUCCESS

And as a result now I have to start all jobs manually.

I've found similar issue: Did not schedule build for branch but there is no answer how to fix this issue.

Can you help?

Paweł Madej
  • 1,229
  • 23
  • 42

2 Answers2

7

For others who will face similar problem:

Be sure to don't have set property:

(Deprecated )Suppress automatic SCM triggering

in "Branch sources" section of Multibranch Pipeline configuration. this kills received trigger and build is not started. After removing this property builds are done just after you commit them.

Paweł Madej
  • 1,229
  • 23
  • 42
  • 1
    This worked, but strangely, my other pipelines have this set and is still being scheduled correctly. – Genki Mar 30 '20 at 16:58
  • Same with us. We have a few pipelines with this setting that still trigger the first build after branch detection and it helps to automatically set params and triggers. Also, I remember seeing this working as expected for all our pipelines, so this may be a regression in one of the upgrades we did. Unfortunately, we can't remove `Suppress automatic SCM triggering` because we don't want the builds to be triggered with all changes, instead we only want the build to be triggered with the initial branch detection. – haridsv Oct 01 '21 at 06:29
0

My problem was that in Build Strategies, I specified specific branches I wanted to run. By removing the named branches, the builds started to automatically build.

Even when using the wildcard for all branches, it would not build. I had to remove named branches altogether.

DarkHark
  • 614
  • 1
  • 6
  • 20