![]() The interesting part comes later when you make a change in only one of the applications. Semaphore will re-run both blocks (because the pipeline itself has changed). change_in('/packages/api/', ) Testing out the pipeline Semaphore uses the default branch to calculate the commit range. When the repository’s default branch is NOT master, we need to supply an additional option: default_branch. This means: “when a file changes in the api folder, relative to the root of the repository, run this block.” Once logged in to Semaphore, use the create new link on the top of the page to add your repository.Ĭhoose run this block when conditions and met and in the box, type the following line: change_in('/packages/api/') Setting a monorepo pipeline works the same as creating any other kind of CI/CD pipeline. $ yarn workspace web start Setup Continuous Integration If you want to try running both applications together, run these commands: $ yarn workspace api start & You can test both applications like this: $ yarn plugin import workspace-tools In the example repository, we have two already-configured lint and test scripts. Start and test any application with: $ yarn workspace start For another, we also gained the ability to run any application directly from the repository root. It is now a lot more feasible to push all dependencies into the repository. ![]() What did we gain with all this work? For one thing, we now have all dependencies compressed and deduplicated, making application startup faster and reducing the space required on disk. If you don’t want to push the modules to, change these two lines in. Therefore, the first push might take longer than usual. That means that all downloaded modules are committed to the remote repository. $ git commit -m "finalize monorepo setup"īear in mind that, by default, Yarn does zero install setups.
0 Comments
Leave a Reply. |