https://github.com/codefresh-io/monorepo-sample
demonstrate monorepo building using codefresh pipeline
https://github.com/codefresh-io/monorepo-sample
Last synced: 3 months ago
JSON representation
demonstrate monorepo building using codefresh pipeline
- Host: GitHub
- URL: https://github.com/codefresh-io/monorepo-sample
- Owner: codefresh-io
- License: mit
- Created: 2020-05-16T00:10:55.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-14T17:53:49.000Z (almost 4 years ago)
- Last Synced: 2026-02-13T08:06:28.808Z (4 months ago)
- Language: Dockerfile
- Homepage: https://codefresh.io/
- Size: 18.6 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# # Codefresh Monorepo example
This is a monorepo with multiple trigger and single pipeline example to demonstrate codefresh muti trigger, annotation and cli as an option to gate control the cd part.
# Monorepo Details
Repo contains multiple microservice namely users, products,items etc under the folder **packages**
## Codefresh Piepline
The pipeline that build indidual services based upon individual service glob expression based trigger is in **./cf/codfresh.yaml**
## Glob expression for the individual services build trigger.
Though all the service can be manged using a single trigger, for the purpose demonstrating multi trigger following 2 trigger are enabled to build **products** and **users** as separate trigger event.
1. Glob expression for **products** ** - ***packages/products/*****
2. Glob expression for **users** ** - ***packages/users/*****
## How to use this pipeline
To use this pipeline
1. Clone this repo
2. Create a new pipeline and replace the content with **./cf/codfresh.yaml** or use the location of this or cloned repo, **./cf/codfresh.yaml** as the pipeline repo location.
3. add the 2 triggers mentioned in the **Glob expression ** section above.
4. Add a pipeline variable by name **RELEASE_NAME**
## How to use this pipeline
To test this pipeline, after creating a piepline as menitoned in the previouse section **How to use this pipeline **.
1. Do a non breaking change to one of the file in ***packages/products/*** folder
2. commit the change with the commit message containing the kye word required for the **products**. The key word in the comment is ***products_build***
> E.g a comment like "testing monorepo for prodcuts, products_build"
>
3. Watch the new build for prodcuts service. This should not run the deploy step yet,as all the required services are not ready yet.
4. Do a non breaking change to one of the file in ***packages/users/*** folder
5. . commit the change with the commit message containing the kye word required for the **users**. The key word in the comment is ***users_build***
6. Watch the new build for users service. This should now run the deploy step yet,as all the required services are not ready by now.