Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
Blue/green deployments for plain K8s k8s-blue-green-deployment
Perform a blue/green deployment using only Kubernetes manifests.
arguments
run:
title: 'Deploying new version ${{CF_SHORT_REVISION}}'
type: k8s-blue-green-deployment
arguments:
SERVICE_NAME: '${{SERVICE_NAME}}'
DEPLOYMENT_NAME: '${{DEPLOYMENT_NAME}}'
NEW_VERSION: '${{NEW_VERSION}}'
HEALTH_SECONDS: '${{HEALTH_SECONDS}}'
NAMESPACE: '${{NAMESPACE}}'
KUBE_CONTEXT: '${{KUBE_CONTEXT}}'