bg-circuit-vertical

Headache-free CI/CD Pipelines.

Codefresh helps you build powerful, fast, and simple CI/CD pipelines.

Device flat

Teams that love Codefresh

TBS Unicef Citrix Steelhouse Bosch
Toolkit

A complete toolkit to integrate and deliver software

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.

Cloning main repository
main_clone:
    title: Cloning main repository...
    type: git-clone
    repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
    revision: '${{CF_REVISION}}'
Building docker image
BuildDockerImage:
    title: 'Building dockerImage'
    type: build
    image_name: containers101/demochat
    dockerfile: Dockerfile
    tag: '${{CF_BRANCH_TAG_NORMALIZED}}-${{CF_SHORT_REVISION}}'
Unit tests
MyUnitTests:
    title: 'Unit Tests'
    image: '${{BuildDockerImage}}'
    commands:
        - 'npm run test'
Creating environment and deploy
DeployStaging:
    title: 'Creating environment and deploy'
    type: deploy
    kind: kubernetes
    cluster: my-k8s-cluster
    namespace: staging
    service: demochat-app
    candidate:
        image: '${{BuildDockerImage}}'
        registry: cfcr
Integration tests
MyIntegrationTests:
    title: 'Unit Tests'
    image: '${{BuildDockerImage}}'
    commands:
        - 'npm run integration-test'
Security scans
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}}'''
Canary release
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
Healthcheck
CheckService:
    title: Healthcheck
    image: byrnedo/alpine-curl
    cmd:
        - 'http://prod.example.com/my-app'
Cloning main repository
main_clone:
    title: Cloning main repository...
    type: git-clone
    repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
    revision: '${{CF_REVISION}}'
Building docker image
BuildDockerImage:
    title: 'Building dockerImage'
    type: build
    image_name: containers101/demochat
    dockerfile: Dockerfile
    tag: '${{CF_BRANCH_TAG_NORMALIZED}}-${{CF_SHORT_REVISION}}'
Store Helm chart
StoreChart:
    title: 'Storing Helm chart'
    stage: deploy
    image: 'codefresh/cfstep-helm:2.12.3'
    environment:
        - ACTION=push
        - CHART_REF=charts/helm-example
Deploy Helm chart
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
Cloning main repository
main_clone:
    title: Cloning main repository...
    type: git-clone
    repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
    revision: '${{CF_REVISION}}'
Show Terraform plan
DeployWithTerraform:
    image: 'hashicorp/terraform:0.12.0'
    title: 'Deploying Terraform plan'
    stage: deploy
    commands:
        - 'terraform init'
        - 'terraform plan'
Approve plan
askForPermission:
    type: pending-approval
    title: 'Is the terraform plan ok?'
Apply plan
DeployWithTerraform:
    image: 'hashicorp/terraform:0.12.0'
    title: 'Deploying Terraform plan'
    stage: deploy
    commands:
        - 'terraform apply -auto-approve'
Cloning main repository
main_clone:
    title: Cloning main repository...
    type: git-clone
    repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
    revision: '${{CF_REVISION}}'
Run tests
RunMyTests:
    title: 'Running Tests'
    stage: test
    image: 'nextcloudci/android:android-40'
    commands:
        - './gradlew test --no-daemon --gradle-user-home=/codefresh/volume/.gradle'
Package application
PackageMyApp:
    title: 'Packaging Android App'
    stage: package
    image: 'nextcloudci/android:android-40'
    commands:
        - './gradlew build  --no-daemon --gradle-user-home=/codefresh/volume/.gradle'