Skip to main content

Cloud Deployment Steps

Last updated on

Harness 3.0 provides native deployment steps for major cloud services including AWS ECS, Google Cloud Run, Azure Functions, AWS CDK, AWS SAM, and Serverless Framework. Each step is containerized and versioned.


ECS Blue-Green Deployment

Multiple steps for ECS blue-green workflows. These steps work together to enable zero-downtime deployments on Amazon ECS using either target group swap or traffic shift strategies.

Step Template IDVersionDescription
ecsBluegreenDeployStepv1.0.0Executes ECS blue-green deployment
ecsBluegreenDeployWithSwapStrategyv1.0.0Blue-green with target group swap
ecsBluegreenDeployWithTrafficShiftStrategyv1.0.0Blue-green with traffic shift
ecsBluegreenRollbackStepv1.0.0Rollback ECS blue-green deployment
ecsBluegreenSwapTargetGroupsStepv1.0.0Swap target groups
ecsBluegreenTrafficShiftStepv1.0.0Shift traffic between deployments
ecsBluegreenTrafficShiftRollbackStepv1.0.0Rollback traffic shift

Key inputs (deploy step):

InputTypeRequiredDescription
connectorconnector (AWS)YesAWS connector
clusterstringYesECS cluster name
regionstringYesAWS region
task_def_modeselectYesTask Definition or Task Definition ARN
task_defstringYesPath to task definition or ARN
service_defstringYesPath to service definition
log_levelselectNoLog level

ECS blue-green supports two deployment patterns: Target Group Swap (deploys to a staging target group, then swaps the production and staging target groups) and Traffic Shift (gradually shifts traffic from old to new deployment using weighted target groups).

ecs-bluegreen-deploy.yaml
steps:
- name: ECS Blue-Green Deploy
uses: ecsBluegreenDeployStep@1.0.0
with:
connector: account.aws_prod
cluster: my-ecs-cluster
region: us-east-1
task_def: ecs/task-definition.json
service_def: ecs/service-definition.json

ECS Run Task

Template: ecsRunTaskStep@1.0.2

Execute a one-off ECS task (not a long-running service).

InputTypeRequiredDescription
connectorconnector (AWS)YesAWS connector
clusterstringYesECS cluster
regionstringYesAWS region
task_defstringYesTask definition path
ecs-run-task.yaml
steps:
- name: Run Migration
uses: ecsRunTaskStep@1.0.2
with:
connector: account.aws
cluster: my-cluster
region: us-east-1
task_def: ecs/migration-task.json

Google Cloud Run

Four steps for Google Cloud Run operations including service deployment, rollback, traffic management, and job execution.

Step Template IDVersionDescription
googleCloudRunDeployv1.0.0Deploy Cloud Run service
googleCloudRunRollbackv1.0.0Rollback Cloud Run service
googleCloudRunTrafficShiftv1.0.0Shift traffic between revisions
googleCloudRunJobv1.0.0Execute Cloud Run job

Key inputs (deploy step):

InputTypeRequiredDescription
connectorconnector (GCP)YesGCP connector
regionstringYesGCP region
projectstringYesGCP project
manifeststringYesService manifest path
imagestringNoContainer image (default: from artifact)
cmd_optionsstringNoCommand options (e.g., --port=8080)
cmd_timeoutstringNoCommand timeout (default: 10m)
cloudrun-deploy.yaml
steps:
- name: Deploy to Cloud Run
uses: googleCloudRunDeploy@1.0.0
with:
connector: account.gcp
region: us-central1
project: my-gcp-project
manifest: cloudrun/service.yaml
image: gcr.io/my-project/myapp:latest

Azure Functions

Three steps for Azure Function deployments supporting both ZIP and container-based deployment models.

Step Template IDVersionDescription
azureFunctionDeployStepv1.0.0Deploy Azure Function (ZIP or Container)
azureFunctionRollbackStepv1.0.0Rollback Azure Function
azureFunctionDeployStrategyv1.0.0Managed deployment strategy

Key inputs (deploy step):

InputTypeRequiredDescription
infraconnector (Azure)YesAzure infrastructure connector
artifactconnectorYesArtifact connector (Azure, Docker, Nexus, Artifactory)
appstringYesFunction app name
slotstringYesDeployment slot
cmdselectYesCommand type (deploy or rollback)
deploy_typeselectYesZIP or CONTAINER
azure-function-deploy.yaml
steps:
- name: Deploy Azure Function
uses: azureFunctionDeployStep@1.0.0
with:
infra: account.azure
artifact: account.acr
app: my-function-app
slot: production
deploy_type: CONTAINER

AWS CDK

Two steps for AWS Cloud Development Kit infrastructure deployments supporting multiple programming languages.

Step Template IDVersionDescription
awsCdkDeployStepv1.0.1Deploy infrastructure with AWS CDK
awsCdkDestroyStepv1.0.1Destroy AWS CDK infrastructure

Key inputs (deploy step):

InputTypeRequiredDescription
tech_stackselectYesLanguage (java, go, dotnet, python)
connectorconnector (AWS)YesAWS connector
regionstringYesAWS region
bootstrapbooleanNoExecute CDK bootstrap
diffbooleanNoExecute CDK diff
synthbooleanNoExecute CDK synth only
app_paramsarrayNoCDK app parameters
stacksarrayNoStack names
aws-cdk-deploy.yaml
steps:
- name: CDK Deploy
uses: awsCdkDeployStep@1.0.1
with:
tech_stack: python
connector: account.aws
region: us-east-1
stacks:
- MyApiStack
- MyDatabaseStack

AWS SAM

Two steps for AWS Serverless Application Model workflows covering both build and deploy phases.

Step Template IDVersionModuleDescription
awsSamBuildStepv1.0.1CIBuild SAM package
awsSamDeployStepv1.0.1CDDeploy SAM package
awsSamDeployStrategyv1.0.1CDManaged SAM deployment strategy
aws-sam-deploy.yaml
steps:
- name: SAM Build
uses: awsSamBuildStep@1.0.1
with:
connector: account.aws
region: us-east-1
- name: SAM Deploy
uses: awsSamDeployStep@1.0.1
with:
connector: account.aws
region: us-east-1
stack_name: my-sam-stack

Serverless Framework

Three steps for Serverless Framework deployments covering packaging, deployment, and rollback workflows.

Step Template IDVersionDescription
serverlessPackageStepv1.0.1Create Serverless package
serverlessDeployStepv1.0.1Deploy Serverless package
serverlessRollbackStepv1.0.1Rollback deployment
serverlessDeployStrategyv1.0.0Managed strategy with rollback

Key inputs (deploy step):

InputTypeRequiredDescription
connectorconnector (AWS)YesAWS connector
regionstringYesAWS region
stagestringYesServerless stage
pathstringNoPath to serverless.yaml
work_dirstringNoWorking directory
client_pathstringNoCLI path (default: serverless)
timeoutstringNoCommand timeout (default: 10m)
stackbooleanNoGet stack details only
serverless-deploy.yaml
steps:
- name: Serverless Deploy
uses: serverlessDeployStep@1.0.1
with:
connector: account.aws
region: us-east-1
stage: production
path: serverless/serverless.yaml
Managed Deploy Strategy

For serverless deployments, consider using the managed strategy (serverlessDeployStrategy) which automatically includes rollback support in case of deployment failures.