NPM private modules and project build chains


#1

For those working with private NPM modules that are shared across projects, has anyone found a way to have dependent project builds trigger on a successful build / deployment to NPM of the private module project? In our dev environment I was thinking of just having the module globally installed as part of the Docker file so it would just pull the latest on each chained build. This would not required any GIT commits, PR’s etc that would normally trigger it.


#2

My team is trying to do something similar but we are going down the path of using circleci to trigger builds / dependency-chaining projects through CI.

We just started on an open source project that helps with this, called cinderblock, can you take a look and see if this is what you need? Notably, cinderblock will let you make the CI of one github repo trigger another CI job and provide feedback through github commit status for the first job.

As for private npm modules, you can publish updated modules with CircleCI following this post. Then after the new module is published, trigger the dependent project build using cinderblock.

Hope this helps. We are also in early stages of trying to explore the best things to do for these cases so I’m very curious about what others are doing here.


#3

Please take a look on this repo:

I solved the build chain problem by creating a new project with all project dependencies as submodules. In my case, I have a web application with two separated git repositories for frontend and backend. Each time a commit is made on frontend or backend repositores, the build bot running in heroku is triggered by github hook API and triggers a new build of the “platform-build” repository, that contains the recipes to build all submodules and release to the production servers if it passes in all tests.


#4