Build an Image from a different Git repository
Build microservices from other repositories
In most cases, your Codefresh pipeline checks out a single Git repository. Codefresh has great support also for monorepos if you have placed all your applications in a single repository.
A Codefresh pipeline is not really tied to a specific Git repository, which means that by checking out multiple Git repositories you can build Docker images from other unrelated repositories in a single pipeline if you wish to do so.
Building Docker images from other Git repositories
Here is a Codefresh pipeline that checks out two microservices from two different Git repositories.
And here is the pipeline definition.
codefresh.yml
The pipeline first checks out two different Git repositories, which themselves contain Dockerfiles. Then it creates a Docker image for each one using the respective Dockerfile.
You can see both images in the Docker image dashboard .
Notice that there are no explicit push steps in the pipeline, as all successful Codefresh pipelines automatically push to the private Docker registry.
Related articles
CI/CD pipeline examples
Git clone step
Build an Image with the Dockerfile in root directory
Build step in pipelines in pipelines
Build and push an image
Parallel pipelines