Merge two gitlab repositories to one with single pipeline

We are in the process of migrating pipelines from Jenkins to Gitlab. Source code is already in Gitlab self managed instance. We have two repos for one of our apps, first one builds front end and the second uses the artifact from first one to build the front end and db, for both of them pipelines run on Jenkins.

I want to merge two repos into one in gitlab and have a single pipeline build both front end and db. Do I use single yml file or what is the best approach?

Appreciate the help.