CICD for Micro Frontend/Microservice mono repo

Hi,

We are working with Micro frontend apps, in mono repo structure. We are facing some issue while architecting bamboo CICD. My mono repo will have multiple subdirectories in it and each subdir are treated as independent application. On every checkin on that repo our bamboo pipeline will get trigger. My requirement is I don’t want to build subdir if their no change in that. Can we somehow check, is there a change in the subdir then build that else skip that ?. Is that possible in bamboo. Please guide me.

Hi,

You can configure what files Bamboo should use to detect changes for a plan under the option

Plan configuration > Repository > Include / exclude files

That allows you to only execute a plan in case files in a subdirectory of your mono repo have changed.

E.g., use the following regex to only build the plan for files within “mysubdir”:

Include only changes that match to the following pattern: mysubdir/.*

Hope that helps.

Best regards,
Michael

1 Like

Hi Michael,

Thanks for your suggestion and your suggested solution will work fine. But here my concern is I have to create multiple bamboo pipeline based on number of applications/subdir in the mono repo. Can I handle that with single pipeline ?.

For example, In the mono repo assume I have applications A,B & C. And in the single pipeline I can create individual tasks for each sub repo and I can check is there any change inside the repo. If change exists I will execute my build commands, else I will skip that project. Is that possible with bamboo ?.

Let me know, if you need anymore details.

Regards,
Murugan Sankar

You’re very welcome.

AFAIK, you have to create a separate build plan for each application, because the repository settings with the mentioned directory include/exclude option belongs to the plan.
With that, you can have tasks specific to your application in the plan. And the plan will only get triggered if files in its directory were changed.

2 Likes