AWS CodeBuild Concepts

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Build Project

Build Badge

A build badge is an embeddable, dynamically generated image that displays the status of the latest build for a project. This image is accessible through a publicly available URL generated for your CodeBuild project. This allows anyone to view the status of an CodeBuild project. Build badges do not contain any security information, so they do not require authentication.

Service Role

The service role, unless specified otherwise, is automatically created with the following policies:

CodeBuildBasePolicy-<build-project-name>-<region>

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Resource": [
                "arn:aws:logs:us-west-2:673499572719:log-group:/aws/codebuild/playground-ops",
                "arn:aws:logs:us-west-2:673499572719:log-group:/aws/codebuild/playground-ops:*"
            ],
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ]
        },
        {
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::codepipeline-us-west-2-*"
            ],
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:GetObjectVersion",
                "s3:GetBucketAcl",
                "s3:GetBucketLocation"
            ]
        }
    ]
}

CodeBuildVpcPolicy-<build-project-name>-<region>

CodeBuildCloudWatchLogsPolicy-<build-project-name>-<region>

For operational details on handling the service role, see

CodeBuild Operations - Role name

VPC

Security Group

The build project configuration allows selecting on or more security groups, which are security groups that AWS CodeBuild should use to work with the VPC. The security groups should allow outbound connections.

Environment Variables

Environment Variables in Build Environments

Build Specification

Build Spec

How the Build is Triggered

The build can be triggered manually from the console: Code Build -> Build projects -> select the project -> Start Build.

The build can be triggered programmatically. How?.

The build can be triggered by a repository push. How?

The build produces a container images and pushes it into a Docker repository. How about deploying it in ECS?

Organizatorium

  • Where is the project actually built? What resources? Relationship to VPC.