CI/CD pipeline Examples
A collection of examples for Codefresh pipelines
Codefresh enables you to define the steps of your pipeline in a YAML file. By default, the file is named codefresh.yml
, and is located in the root directory of the repository.
Programming Language specific
Codefresh is agnostic as far as programming languages are concerned. All major programming languages are supported:
- Go Web App or Go CLI
- Spring Java app with Maven or Gradle. Also how to upload JAR to Nexus/Artifactory
- Node Express.js App or React.js App
- Php App
- Python Django App
- Ruby On Rails App
- C or C++
- Rust
- C# .NET core
- Scala App
- Android (Mobile)
Checking out source code
You can checkout code from one or more repositories in any pipeline phase. Codefresh includes built-in GIT integration with all the popular GIT providers and can be used with git-clone steps.
- Cloning Git repositories using the built-in integration
- Cloning Git repositories using manual Git commands
- Checking out from Subversion, Perforce, Mercurial, etc
Build/Package
Codefresh has native support for building and pushing Docker containers. You can also compile traditional applications that are not Dockerized yet.
- Build an Image with the Dockerfile in Root Directory
- Build an Image by Specifying the Dockerfile Location
- Build an Image from a Different Git Repository
- Build and Push an Image
- Build an Image With Build Arguments
- Sharing data between steps
- Uploading or Downloading from a Google Storage Bucket
- Get Short SHA ID and Use it in a CI Process
- Calling a CD pipeline from a CI pipeline
- Trigger a Kubernetes Deployment from a Dockerhub Push Event
Testing
Codefresh has support for both unit and integration tests as well as test reporting.
- Run Unit Tests
- Run Integration Tests
- Run Integration Tests with MongoDB
- Run Integration Tests with MySQL
- Run Integration Tests with PostgreSQL
- Run Integration Tests with Redis
- Shared volumes of service from composition step for other yml steps
- Launch Composition
- Launching a Composition and Defining a Service Environment Variables using a file
- Run multiple kinds of unit tests using fan-in-fan-out parallel pipeline
Code Coverage
- Run coverage reports with Codecov
- Run coverage reports with Coveralls
- Run coverage reports with Codacy
Secrets
Codefresh can automatically export secret key-value pairs using the Vault plugin from the Step Marketplace.
Preview environments
Codefresh can automatically launch environments (powered by Docker swarm) to preview a Pull Reqest or feature. The definition of the environment can come from an existing composition, a docker-compose file or an inline YAML. Preview environments can be launched manually or automatically from pipelines.
- MongoDB preload data
- NodeJS + Angular2 + MongoDB
- NGINX Basic Auth
- Spring Boot + Kafka + Zookeeper
- Web terminal
Deployment
Codefresh can deploy to any platform such as VMs, FTP/SSH/S3 sites, app servers but of course it has great support for Kubernetes clusters and Helm releases:
- Deploy to a VM with packer
- Deploy to a VM with FTP
- Deploy to Tomcat using SCP
- Deploy Demochat to a Kubernetes cluster
- Use kubectl as part of Freestyle step
- Deploy with Kustomize
- Deploy with Helm
- Deploy with Terraform
- Deploy with Pulumi
- Deploy to Nomad
- Deploy to Heroku
- Deploy to Docker swarm
- Deploy to Elastic Beanstalk
- Deploy to Amazon ECS/Fargate