Only allow merge requests to be merged if the pipeline succeeds

Hi all,
We have jenkins pipelines integrated with gitlab on the project. I need prevent merge requests from being merged if pipelines did not succeed. I’ve tried the following “Navigate to your project’s settings page and expand the Merge requests section. In the Merge checks subsection, select the Pipelines must succeed check box and hit Save for the changes to take effect” as described there Merge when pipeline succeeds · Merge requests · Project · User · Help · GitLab , but it doesn’t help. It still merges before job completed. I’m not sure maybe we need additional configure jenkins pipeline for that, but I couldn’t find the solution.
Will be appreciate for any help.