Run CircleCI build from particular repository when changes happenes in any of the related repositories



We have around ~50 GitHub repositories for building the product, one repository actually does code packaging and creates the build. Currently CircleCI code placed only in build repository so whenever code goes into this particular build repository, it compiles the code, creates the build for that branch and pushes to AWS.

But our main objective is to create build when code goes into any of the 49 repositories so how can build repository will come to know changes happened in other repositories (Reference repos list: Build needs to be triggered for further check accordingly considering all repos instead of just building the code when changes go into particular build repository… I read something related hooks but any easy way to do it through CircleCI yml file?

Reference GitHub repo:

Can someone provide the related help?


Two ways come to mind:

  • If you have a spare always-on server, you could use the HTTP callback system in GitHub to notify it of any repo changes, and then use that to kick off a build via the CircleCI HTTP API
  • If you want to contain this just within CircleCI, then use the build scheduler system to run a build that will not do the actual build if the repo hashes are the same
    • you might want to do shallow Git clones here for speed
    • you could use the CircleCI cache system to store state

Out of the two approaches, the first one would be the most responsive, but the second one would be easier to set up. I would guess the second one should have a schedule of every 2-3 hours, to avoid overwhelming your build minutes allowance.


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