semaphoreci / book-monorepo-cicd Goto Github PK
View Code? Open in Web Editor NEWEffectively build, test, and deploy code with monorepos.
License: Other
Effectively build, test, and deploy code with monorepos.
License: Other
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!
To avoid a few turns in your favorite search engine or having to build the PDF manually.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.