Long story short
What is the best way to design a shared CD for multiple Git repositories (frontend and backend)?
I'm struggling to find the best design for our CD.
The whole picture (The details can be changed)
- There will be only a single frontend in the project.
- Backend - ASP.NET (C#), no artifactory.
- There will be only a single backend in the project.
- Git repository on Git TFS for each.
- Server for Jenkins.
- Multiple machines,
Dgroup, for deploying the last version from branch
developmentfrom both the repositories - a playground for each developer.
developmentbranch must be protected by pull request and build must pass. In more details: Jenkins need to confirm that the last version of the branch who activated the pull request os compiled and the tests of his repository are pass. Also the integration tests with the other repository won't fail(The tests of the frontend). Meaning for each pull request in every repository, Jenkins need to "unified" the build for both the repositories. If every test of each repository passes, then the pull request is ready to be approved. Else, the pull request is denied.
After each approved pull request,
Dgroupmachines should be updated to have the latest version of the product (services + frontend files).
I can't find a way to achieve my first goal from multiple reasons:
The frontend can't push any new feature from the beginning until the backend will finish the same feature from his side, else some frontend's tests won't pass. I don't know how it will effect the workflow of the frontend and if it is the best practice.
Imagine a situation when the
developmentbranch in both the repositories is broken but no1 yet wrote the right test that will find the bugs (For now the build passes). Now the frontend create a pull request which contain a test that find a bug in the backend. So the build don't pass so automatically his pull request is denied.
Now the backend fix the problem and try to pull request. Now his change also fail a test of the frontend. So his pull request also denied.As a result no one can pull request anymore.
My CD design, which I did not describe due to the flaws, prevent me from going forward. What is the best practice to design a CD for multiple Git repositories?