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
masterto be excluded from the job.
- Enabled the
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
The steps are:
Let’s say I have 2 branches: develop and feature.
git checkout feature && git add . && git commit "bla bla" -m "[ci-skip]" && git push
- At this point there is no job triggered at all, that’s OK since I’ve enabled
git checkout develop
git merge --no-ff feature && git push
- 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