# Does CircleCI 2.0 supports building a project separately in a Multi-Project repo

**URL:** <https://discuss.circleci.com/t/does-circleci-2-0-supports-building-a-project-separately-in-a-multi-project-repo/23645>\
**Category:** Build Environment\
**Tags:** circle-yml\
**Created:** [July 17, 2018, 6:21am UTC](https://discuss.circleci.com/t/does-circleci-2-0-supports-building-a-project-separately-in-a-multi-project-repo/23645 "2018-07-17T06:21:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sapanprajapati](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/sapanprajapati/32/12981_2.png) [@sapanprajapati](https://discuss.circleci.com/u/sapanprajapati)\
**Post date:** [July 17, 2018, 6:21am UTC](https://discuss.circleci.com/t/does-circleci-2-0-supports-building-a-project-separately-in-a-multi-project-repo/23645/1 "2018-07-17T06:21:56Z")

</div>

Does anyone know how to trigger a build only for the project for which code push is done ( Assuming that a github repository contains multiple projects each needs to be built on code push). Currently all projects in my github repo are getting built (using dedicated workflow for each project ) on code push for a project, which I don’t want.

Thanks !

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [July 17, 2018, 6:27am UTC](https://discuss.circleci.com/t/does-circleci-2-0-supports-building-a-project-separately-in-a-multi-project-repo/23645/2 "2018-07-17T06:27:20Z")

</div>

Possible useful links:

> [@Building Monorepo Projects With CircleCI](https://discuss.circleci.com/t/building-monorepo-projects-with-circleci/1923):
>
> I’ve been experimenting with setting up our code repo to build with CircleCI and I’m finding that the system isn’t particularly well set-up for our monorepo codebase. We have a few projects I’d like to build inside our single, larger repository, but I’m not sure how to handle this kind of project since you can only specify a single build directory. Right now I’m thinking that I’ll need to individually specify all of the test/build commands to run inside each individual application’s subfolders i…

[https://discuss.circleci.com/t/does-circleci-2-0-work-with-monorepos/10378](https://discuss.circleci.com/t/does-circleci-2-0-work-with-monorepos/10378)

---

<div class="post-metadata">

**Author:** ![sapanprajapati](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/sapanprajapati/32/12981_2.png) [@sapanprajapati](https://discuss.circleci.com/u/sapanprajapati)\
**Post date:** [July 17, 2018, 6:30am UTC](https://discuss.circleci.com/t/does-circleci-2-0-supports-building-a-project-separately-in-a-multi-project-repo/23645/3 "2018-07-17T06:30:46Z")

</div>

Hi Halfer, I have already gone through these links and the solution provided there is not working for me.

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [July 17, 2018, 6:33am UTC](https://discuss.circleci.com/t/does-circleci-2-0-supports-building-a-project-separately-in-a-multi-project-repo/23645/4 "2018-07-17T06:33:06Z")

</div>

I wonder, would you edit your first post to say what you have tried, in that case? Please show code. That will help save the time of people who suggest things that you have already considered.

---

<div class="post-metadata">

**Author:** ![sapanprajapati](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/sapanprajapati/32/12981_2.png) [@sapanprajapati](https://discuss.circleci.com/u/sapanprajapati)\
**Post date:** [July 17, 2018, 11:45am UTC](https://discuss.circleci.com/t/does-circleci-2-0-supports-building-a-project-separately-in-a-multi-project-repo/23645/5 "2018-07-17T11:45:19Z")

</div>

What I could find is that, solution provided in “ **Does-circleci-2-0-work-with-monorepos?** ” is more specific to a single job and not for a complete workflow. In my case I have configured 3 different workflows corresponding to 3 different projects ( e.g **A** , **B** , **C** ) residing in the same github repository. When I push code changes for project **A** it should only trigger workflow corresponding to project **A** only.  
Above solution won’t stop all workflows from getting triggered. The only thing I can do is to stop these workflows once it got triggered. This can be done by putting an if condition inside very first job of each workflow to check if changes done are related with that workflow or not. If not then exit workflow with some error code, which will not be the right way. Errors in build jobs always triggers an email to all who are following the project.

---

<div class="post-metadata">

**Author:** ![FelicianoTech](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/felicianotech/32/21348_2.png) [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Post date:** [July 18, 2018, 2:24am UTC](https://discuss.circleci.com/t/does-circleci-2-0-supports-building-a-project-separately-in-a-multi-project-repo/23645/6 "2018-07-18T02:24:53Z")

</div>

That’s one of the options. Basically, the two are, use Bash/Git or something else to detect which project change, and then only run relevant tests. Or separate the monorepo and it’ll run as expected.

---

<div class="post-metadata">

**Author:** ![sapanprajapati](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/sapanprajapati/32/12981_2.png) [@sapanprajapati](https://discuss.circleci.com/u/sapanprajapati)\
**Post date:** [July 18, 2018, 7:11am UTC](https://discuss.circleci.com/t/does-circleci-2-0-supports-building-a-project-separately-in-a-multi-project-repo/23645/7 "2018-07-18T07:11:46Z")

</div>

@FelicianoTech : Detecting which project got changed needs all Workflows/Jobs to be triggered first and that is what we don’t want. Logically this solution is as good as letting builds for all projects triggered and then manually going to CirlceCI console and canceling the one which is not required.  
Creating separate monorepo for each and every project is not the ideal way especially in our case it gives us more flexibility to manage projects by using single repo. Its a big drawback of CircleCI if we compare it with jenkins or other CI tools. Can’t CircleCI provide it as a feature in future release?

---

<div class="post-metadata">

**Author:** ![FelicianoTech](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/felicianotech/32/21348_2.png) [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Post date:** [July 18, 2018, 3:40pm UTC](https://discuss.circleci.com/t/does-circleci-2-0-supports-building-a-project-separately-in-a-multi-project-repo/23645/8 "2018-07-18T15:40:20Z")

</div>

What I wrote were the two options you have right now.

Definitely possible for the future. There’s a Request Request here you can vote up: [https://circleci.com/ideas/?idea=CCI-I-208](https://circleci.com/ideas/?idea=CCI-I-208)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [October 16, 2018, 3:41pm UTC](https://discuss.circleci.com/t/does-circleci-2-0-supports-building-a-project-separately-in-a-multi-project-repo/23645/9 "2018-10-16T15:41:11Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
