Deploy Environment
Start a deployment for a Microtica environment with the deploy step. Run it on every execution, filter by branch, or deploy specific resources partially.
Start a new deployment for a specific environment.
This step initiates the environment deployment and does not wait for it to finish. The deployment continues running asynchronously.
You can monitor deployments from the portal under Environments, from Slack, or both.
Syntax
steps:
step-name:
type: deploy
target: environment
env_id: DEV-rft43
branch_filter: master| Parameter | Description | Required |
|---|---|---|
| title | The display name of the step. | No |
| type | The type of the Microtica built-in step. Should always be deploy for this type of step. | Yes |
| target | Should always be environment for this type of step. | Yes |
| env_id | The ID of the environment to initiate deployment for. | Yes |
| branch_filter | Initiate deployment only for commit/manual trigger on specified branch. If not specified, deployment will be initiated on every pipeline execution. E.g. develop, feature/upgrade-eks etc. | No |
| partial | Initiate deployment for specific environment resources with their respective version. Partial deployment is useful for continuous delivery of infrastructure components where each component has its own pipeline. Syntax: create_missing_resources: true|false resource_version_overrides: <name of the environment resource>: <version to be deployed> | No |
Initiate deployment on an existing environment
In the example below, you package a CFN template into a Microtica component that was previously added to the environment. This packages a new version of the component and initiates the environment deployment.
steps:
Clone:
title: Clone my source code from Git
type: git-clone
Package:
title: Package my CFN template into Microtica Component
type: cfn-component
cfn_template: template.json
Deploy:
type: deploy
target: environment
env_id: DEV-5ZKJHq8APyWith this configuration, deployment is triggered on the environment with ID DEV-5ZKJHq8APy on every pipeline execution.
Initiate deployment for a specific branch
You can orchestrate environment deployments based on the Git branch the pipeline was triggered from, for both commit and manual triggers.
This is useful for Trunk-Based Development, where you maintain a separate branch per environment. A commit on each branch builds the component source code from that branch and triggers deployment on the matching environment.
steps:
Clone:
title: Clone my source code from Git
type: git-clone
Package:
title: Package my CFN template into Microtica Component
type: cfn-component
cfn_template: template.json
Deploy:
type: deploy
target: environment
env_id: DEV-5ZKJHq8APy
branch_filter: developWith this configuration, deployment is triggered on the environment with ID DEV-5ZKJHq8APy only if the pipeline was triggered from the develop branch.
Next steps
Docker Push
Build and push a Docker image to a remote registry with the docker-push step. Set the tag, Dockerfile path, build context, build arguments, and image scanning.
Deploy Application
Re-deploy an application to a Kubernetes cluster with the deploy step. Set the cluster, service, and image tag, and optionally filter the deploy by branch.