Get insights into your continuous integration (CI) builds with LocalStack CI Analytics
LocalStack enables organizations to automate their application testing and integration process through DevOps practices, such as continuous integration (CI). To meet your organizational needs, LocalStack lets you move away from complicated AWS testing and staging environments by enabling a key component of testing and delivering cloud-native applications.
You can easily integrate LocalStack with your existing CI platform. We provide native plugins for CircleCI and a generic driver for any other CI platform you might use. This enables you to incorporate LocalStack’s local AWS cloud emulation in your CI pipelines, use advanced features like Cloud Pods and CI analytics, and run your test & integration suite before pushing to production.
Hypothetical CI workflow
Let’s assume that your team has an automated CI workflow into which you want to integrate end-to-end cloud testing with LocalStack. As an example, consider the following pipeline, which represents part of a simple CI workflow:
The CI build is triggered by pushing code to a version control repository, like GitHub. The CI runner starts LocalStack and executes the test suite. You can also use the same Infrastructure-as-Code (IaC) configuration that you use to set up AWS in your production environment to set up LocalStack in the CI environment. You can also pre-seed state into the local AWS services (e.g., DynamoDB entries or S3 files) provided by LocalStack in your CI environment via Cloud Pods.
After a successful test run, you can execute the more expensive AWS CodeBuild pipeline for deploying your application. You can enrich the test reports created by your testing framework with traces and analytics generated inside LocalStack.
The steps required for the integration differ slightly depending on your preferred CI platform. Please refer to the relevant sections CI keys settings page](https://app.localstack.cloud/workspace/ci-keys) in the LocalStack Web app.
LocalStack Docker images can be used in your CI environment by adding a CI Key. The images are available on Docker Hub, and comprehensive documentation is available on our Docker images documentation. Community users can use the
localstack/localstack image, while Pro and Team users can use the
localstack/localstack-pro image. For Big Data jobs that require services such as EMR, Athena, and Glue, we provide a mono-container that uses the
localstack/localstack-pro:2.0.2-bigdata image, which bakes in the required dependencies, such as Hadoop, Hive, Presto, into the LocalStack image.
Use LocalStack in CircleCI
A CI key is used to access LocalStack in CI or other machine environments.