To create an effective CI/CD process, it should be possible to trigger a Codefresh pipeline execution not only on code repository events (like
PR), but also on any “interesting” CD-related event, coming from some external system.
Codefresh not only allows you to define different pipelines on a single project but it also offers you the capabilility to trigger them with completely separate mechanisms.
Codefresh Trigger Types
Trigger types currently supported by Codefresh are:
As an example, this project contains 4 pipelines:
Behind the scenes these pipelines are triggered from different events
- Pipeline “CI-build” is using a GIT trigger and starts after every commit to the code repository
- Pipeline “Sonarcloud” is executed every weekend using a cron (timed) trigger
- Pipeline “integration-test” is executed whenever a commit happens in a Pull request on the code
- Pipeline “deploy-prod-k8s” is executed whenever a Docker image is pushed to the Docker registry
This is just an example. You are free to create your own triggers that match your own internal process. It is also possible to add multiple triggers for a pipeline so that it is executed for more than one type of events.
If a pipeline has no defined trigger you can still start it manually.
For all trigger types you can also use the Codefresh CLI to manage them.
Creating a new trigger for a pipeline
By default when you create a new project from a GIT provider it will start with a GIT trigger that runs on every commit.
You can either delete this trigger, modify it, or add new ones.
To add a new trigger expand the “Triggers” section in your pipeline and click the “Add Trigger button”. This will bring up the respective dialog where you are add a new trigger.
For more information see: