Search code examples
tfsdevopscicdtfs-2018

ci/cd for Poly-repo project


I have a project in which front-end and back-end are in different tsf 2018 repositories

enter image description here

front-end is written on ReactJS and back-end is written on Java, i want to setup ci/cd that so when new commit is pushed into front-end repo it will create a new bundle via npm run build command and drop it into specific folder inside back-end repo. Is it possible to do it with tsf 2018? and if so where i can find any tutorials or examples for ci/cd setup for projects with such structure


Solution

  • Usually you don't push the built ui into the back-end repo. It depends on how you deploy your application but in the case of containers or image deployments, you could use tools such as jenkins or kubernetes to build a single image containing the backend with the frontend. To make the deployment process more efficient you could split the build into 3 builds:

     front-end change -> npm run build 
                                       -> mv ${FRONT_END}/build/* ${BACK_END}/public -> deploy
     back-end change  -> mvn install