Your rules
when
value takes precedence of the when
value in the job.
From the documentation:
If a rule matches and has no when
defined, the rule uses the when
defined for the job, which defaults to on_success
if not defined.
You can mix when
at the job-level with when
in rules. when
configuration in rules
takes precedence over when
at the job-level.