Docs
circleci.com
Start Building for Free

Deployment overview

1 month ago1 min read
Cloud
Server v4.x
Server v3.x
Server v2.x
On This Page

Deployment with CircleCI is just the same as any other job configuration. You create a job and configure it to deploy to virtually any target. This document provides an overview of the deployment process, along with best practices and optimization strategies.

Overview

Once a software application has been developed and tested, it needs to be deployed and made available for its intended audience. CircleCI can deploy to virtually any target, and can be easily configured to integrate with other services for QA/testing, feature management, and deployment strategies such as blue-green or canary deployment. Quickly and easily customize your configuration to match your requirements, whether a fully automated process or elements of manual approval are required.

The basics of deployment

  • Deployment job: To deploy your application, add a job to your .circleci/config.yml file and configure the job to run the steps you require. Visit the other pages in the deployment section of the documentation for example configurations for common deployment targets.

  • Deployment parameters: You may need to add environment variables and SSH keys to fulfill your deployment steps. Environment variables can be added to the project itself via the CircleCI web app (follow links below for detailed instructions), or defined within your configuration.

  • Manual approval: If your deployment strategy requires a manual approval step, you can include a hold/approve job within your workflow. A manual approval button will then be available from the workflows map in the CircleCI web app.

Using orbs to simplify deployment

CircleCI offers packages of reusable configuration known as orbs. Orbs are available for many common deployment targets, which can help you to simplify and streamline your configuration. Check out the full range of available orbs in the Orbs Registry. For simple deployment pipelines, using orbs will get you the results you need with minimal configuration.

As an example, consider the AWS CodeDeploy orb. This orb has a pre-configured deploy job, which you can include in your configuration with a single line aws-code-deploy/deploy once the orb has been invoked by adding the orbs stanza. For this example deployment can be as simple as:

version: 2.1

orbs:
  aws-code-deploy: circleci/aws-code-deploy@x.y
workflows:
  deploy_application:
    jobs:
      - aws-code-deploy/deploy:
          application-name: myApplication
          bundle-bucket: myApplicationS3Bucket
          bundle-key: myS3BucketKey
          deployment-group: myDeploymentGroup
          service-role-arn: myDeploymentGroupRoleARN

Under the hood, this orb creates, bundles and deploys your application using your specified parameters set under the aws-code-deploy/deploy job declaration.


Help make this document better

This guide, as well as the rest of our docs, are open source and available on GitHub. We welcome your contributions.

Need support?

Our support engineers are available to help with service issues, billing, or account related questions, and can help troubleshoot build configurations. Contact our support engineers by opening a ticket.

You can also visit our support site to find support articles, community forums, and training resources.