Amazon CodeBuild is a fully managed continuous integration service. You just specify the location of your source code, choose your build settings, and CodeBuild will run build scripts for compiling, testing, and packaging your code. There are no servers to provision and scale, or software to install, configure, and operate.
Build and test your code
Amazon CodeBuild runs your builds in preconfigured build environments that contain the operating system, programming language runtime, and build tools (e.g., Apache Maven, Gradle, npm) required to complete the task. You just specify your source code’s location and select settings for your build, such as the build environment to use and the build commands to run during a build. Amazon CodeBuild builds your code and stores the artifacts into an Amazon S3 bucket, or you can use a build command to upload them to an artifact repository. You can create, manage, and initiate build projects using the Amazon Web Services Management Console, Amazon CLIs, or SDKs.
Preconfigured build environments
Amazon CodeBuild provides build environments for Java, Python, Node.js, Ruby, Go, Android, PHP, .NET Core for Linux, and Docker.
See a full list of preconfigured build environments here.
Customize build environments
You can bring your own build environments to use with Amazon CodeBuild, such as for the Microsoft .NET Framework. You can package the runtime and tools for your build into a Docker image and upload it to a public Docker Hub repository or Amazon EC2 Container Registry (Amazon ECR). When you create a new build project, you can specify the location of your Docker image, and CodeBuild will pull the image and use it as the build project configuration.
Specify build commands
You can define the specific commands that you want Amazon CodeBuild to perform, such as installing build tool packages, running unit tests, and packaging your code. The build specification is a YAML file that lets you choose the commands to run at each phase of the build and other settings. CodeBuild helps you get started quickly with sample build specification files for common scenarios, such as builds using Apache Maven, Gradle, or npm.
See build specification sample files here.
Select compute type
You can select the compute type that is best suited to your development needs. You can choose from three levels of compute capacity that vary by the amount of CPU and memory. This lets you choose higher CPU and memory compute if you want your builds to complete faster, or if your builds require a minimum level of CPU and memory to complete. CodeBuild supports Linux and Windows operating systems.
Choose source integrations
You can initiate builds with Amazon CodeBuild in several ways. For example, you can initiate builds in CodeBuild after connecting to source repositories such as GitHub, GitHub Enterprise, Bitbucket, or Amazon S3.
Continuous integration and delivery workflows
Amazon CodeBuild’s on-demand compute and pay-as-you-go model enable you to build and integrate code more frequently, helping you find and fix bugs early in the development process when they are easy to fix. You can integrate CodeBuild into your existing continuous integration and continuous delivery (CI/CD) workflow using its source integrations, build commands, or Jenkins integration. CodeBuild also belongs to a family of Amazon Web Services Code Services that helps you practice CI/CD.
Security and permissions
Amazon CodeBuild is integrated with Amazon Identity and Access Management (IAM) so you can set granular controls over which users and Amazon Web Services resources have access to your builds.
You can use the Amazon CodeBuild Console, Amazon CLI, SDKs, and APIs, or Amazon CloudWatch to view detailed information about your builds. Amazon CodeBuild shows you information such as the build’s start time, end time, status and commit ID. CodeBuild also streams build metrics and logs to CloudWatch. You can use CloudWatch to create a custom dashboard, set a CloudWatch Alarm, troubleshoot build issues, or inspect build logs.