Build triggered from excluded branch when a commit pushed from other branch

Hi team,
I have configured Jenkins 2.319.3 as our CI Server.
I’m using Gitlab as Source Code Management.

In the Job Configuration I set some options as below:

  • Set the master to be excluded from the job.
  • Enabled the [ci-skip]

The problem is, when I pushed changes to the remote from any branch, the Job will be triggered too from excluded branches and any commit message that has [ci-skip].

The steps are:
Let’s say I have 2 branches: develop and feature.

  1. git checkout feature && git add . && git commit "bla bla" -m "[ci-skip]" && git push
  2. At this point there is no job triggered at all, that’s OK since I’ve enabled [ci-skip]
  3. git checkout develop
  4. git merge --no-ff feature && git push
  5. At this point the job will be triggered twice, first is from point 1 (Where i put [ci-skip]) then the second is at point 4 (Where the Jenkins should trigger the job).

At Point 1, the same condition applies when I push a commit without [ci-skip] message but pushing from excluded branch instead.

As far as I know Jenkins should not build from any [ci-skip] and excluded branches based on my Job Configurations.
I think there’s an option that need to be configured, but I don’t know wich one.

Thanks for you advice
Ghani