Multiple "projects" in same repository

I have tried to read up on “workflows” etc but still dont get how to achieve what I want.

I would like to add a “filter”, but on a path in the repo, not a tag or branch.

I.e,
if /root/Project/* has changed files, run workflow
if /root/Procect_2/* has changed files, run another workflow

In TEAMCITY, I just add an trigger like this:
+:Project_2/**

https://confluence.jetbrains.com/display/TCD18/Configuring+VCS+Triggers#ConfiguringVCSTriggers-TriggerRulesExamples

Is this even possible with circleci?

I’ve not done this, but it’s been asked about before.

My guess is that builds will always run based on changes to the repo, but you could get it to build the right thing based on which path has changed. Worst case scenario, you could use some Git hackery to determine which path(s)/project(s) have changed, and then run all that apply using conditional steps (or a Bash script with if blocks in it).

Yeah, hacks always work :slight_smile:
I just hoped there was official support for this, but that I just misread the docs… I don’t really like hacky solutions, always lead to headache down the road.

For now, I think the best, but ugly & cloggy solution, could be to use workflows with tag-triggers, and then use different tags based on what to build. But I guess the ugliness there will be a lot of “unnecessary” tags in the repo.

Have a look at the “Ideas” page (linked from the main CircleCI site) to see if it has been proposed.

Personally, I think a hack here could be pretty clean and stable, but then that’s easy to say when one does not have to do it!

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