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.ymlfile 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.
Add project-level environment variables
Add project-level SSH keys
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: firstname.lastname@example.org 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.
Using images to simplify deployment
CircleCI offers convenience images for use with Docker that contain tools required for common deployment scenarios. Convenience images provide fast spin-up times, as well as reliability and stability. Visit the CircleCI Developer Hub links below to find out more information on each of the deploy convenience images.
Also head to the orbs registry to see if there is an orb for your deployment target to help keep your configuration simple. If not consider authoring one!
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.
- Suggest an edit to this page (please read the contributing guide first).
- To report a problem in the documentation, or to submit feedback and comments, please open an issue on GitHub.
- CircleCI is always seeking ways to improve your experience with our platform. If you would like to share feedback, please join our research community.
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.
CircleCI Documentation by CircleCI is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.