Giter Site home page Giter Site logo

semaphoreci / book-monorepo-cicd Goto Github PK

View Code? Open in Web Editor NEW
83.0 83.0 8.0 27.01 MB

Effectively build, test, and deploy code with monorepos.

License: Other

Makefile 25.68% TeX 2.80% CSS 71.52%
cicd continuous-deployment continuous-integration ebook monorepo semaphoreci

book-monorepo-cicd's People

Contributors

davorpa avatar markoa avatar tomfern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

book-monorepo-cicd's Issues

Change detection in monorepos with common libraries

Hi,

Thanks for writing and publishing the e-book. I enjoyed reading it.
One of the challenges I've faced when implementing CI/CD in monorepos is change detection in repos that have common source code packages. For example, imagine a repository that looks like this:

backend/
frontend/
common/lib1
common/lib2
common/lib3

Where backend and frontend are both dependent on packages that are under the common library and import their build artifacts using package managers' monorepo tooling such as yarn workspaces.

In this case I would like to build backend and frontend whenever there's a change in them or in any of the packages they depend on. If some packages in common also depend on other packages in common then it becomes a lot more complex.

Using file-path based change detection is cumbersome since you'd need to manually maintain a list of each deployable's deep dependencies in the repository.

Unfortunately, this is a very common use case in monorepos. I'd go as far as saying it's one of the biggest advantages monorepos give us (you even mention it in the book- easier dependency management).

Luckily, tools such as pnpm have CLI commands that make it easy to create a list of files that should trigger a change detection.

What would your recommendation be to make use of such tooling?
This is going into "feature request" territory, but is it possible to configure the change detection to take the file list from an environment variable? That way I can always run a job that populates the env variable with the more sophisticated tooling and only then would the change detection triggers be checked.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.