Introduction to Codefresh pipelines
What are Codefresh pipelines?
Codefresh pipelines are container native and can be configured to automate a sequence of steps that can ends in a deployment to production, push of an image to a Docker registry and more.
- Every step in the pipeline is running inside a container.
- Steps in the pipeline share the same volume, hence later steps can use artifacts from previous steps.
- Steps can export environment variables that can be used in later steps in the pipeline.
- Steps can be set to run on certain conditions (branch, value of environment variable etc..)
- Steps can annotate the built Docker image with any attribute (test status, link to detailed test report etc…
- There are out of the box steps to spin up a composition (multiple services at once), then run UI / Integration / Performance text, then shut down the composition. Learn more about Codefresh pipeline’s steps
To configure existing pipeline or add new pipeline, click on the cogwheel icon on the relevant repository.
You can have one or more pipeline for the same repository. click on the ‘+’ to add a new pipeline
Editing pipeline steps and flow
There are two modes to define the pipeline workflow/steps.
- Using the built-in pre-defined steps in the UI
- Using Codefresh’s Yaml format
You can switch between Yaml and the Built-in steps using the toggle in the pipeline’s configuration view.
Pipeline Triggers and webhook
On the General settings of the pipeline, you can configure the trigger for the pipeline. You can at any time trigger a pipeline manually as well.
Here are the options to trigger pipeline execution
Press Build button at the bottom of the pipeline or on the repository to trigger pipeline execution.
Setup a GitHub webhook on any commit or pull request on all branches or on specific branches (using a regular expression).
Trigger Codefresh pipeline from any tool or command line by copying the Codefresh webhook and calling it directly.
Use Codefresh Jenkins plugin to invoke Codefresh pipeline from Jenkins job.
It is possible to trigger Codefresh pipeline execution when a new image pushed into DockerHub. Currently, you need to use Codefresh CLI to setup a Codefresh trigger for DockerHub
Visit DockerHub Trigger page for more details.
It is possible to trigger Codefresh pipeline execution periodically, using timer, and
Visit Cron Trigger page for more details.