> For the complete documentation index, see llms.txt.
Skip to main content

Check out Port for yourself ➜ 

AWS CodeBuild

AWS::CodeBuild::Project​

The following example demonstrates how to ingest your AWS CodeBuild projects to Port.

CodeBuild Project supported actions​

The table below summarizes the available actions for ingesting AWS CodeBuild Project resources in Port:

ActionDescriptionTypeRequired AWS Permission
GetProjectDetailsActionDiscover CodeBuild projects and retrieve detailed configuration data such as source, environment, and artifacts.Defaultcodebuild:ListProjects, codebuild:BatchGetProjects
All properties available by default

CodeBuild projects expose their key properties via the default GetProjectDetailsAction.

You can use the following Port blueprint definitions and integration configuration:

CodeBuild Project blueprint (click to expand)
{
"identifier": "codeBuildProject",
"title": "CodeBuild Project",
"icon": "AWS",
"schema": {
"properties": {
"name": {
"type": "string",
"title": "Project Name",
"description": "The name of the CodeBuild project"
},
"arn": {
"type": "string",
"title": "ARN",
"description": "The Amazon Resource Name (ARN) of the CodeBuild project"
},
"description": {
"type": "string",
"title": "Description",
"description": "A description of the CodeBuild project"
},
"serviceRole": {
"type": "string",
"title": "Service Role",
"description": "The ARN of the AWS Identity and Access Management (IAM) service role"
},
"timeoutInMinutes": {
"type": "number",
"title": "Timeout (Minutes)",
"description": "How long, in minutes, from 5 to 480, for AWS CodeBuild to wait before timing out any related build"
},
"queuedTimeoutInMinutes": {
"type": "number",
"title": "Queued Timeout (Minutes)",
"description": "The number of minutes a build is allowed to be queued before timing out"
},
"encryptionKey": {
"type": "string",
"title": "Encryption Key",
"description": "The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build project artifacts"
},
"environment": {
"type": "object",
"title": "Build Environment",
"description": "Information about the build environment for the build project"
},
"source": {
"type": "object",
"title": "Source",
"description": "Information about the build input source code for the build project"
},
"artifacts": {
"type": "object",
"title": "Artifacts",
"description": "Information about the build output artifacts for the build project"
},
"created": {
"type": "string",
"title": "Created",
"description": "When the build project was created",
"format": "date-time"
},
"lastModified": {
"type": "string",
"title": "Last Modified",
"description": "When the build project was last modified",
"format": "date-time"
},
"projectVisibility": {
"type": "string",
"title": "Project Visibility",
"description": "The visibility setting for the project",
"enum": [
"PRIVATE",
"PUBLIC_READ"
]
},
"concurrentBuildLimit": {
"type": "number",
"title": "Concurrent Build Limit",
"description": "The maximum number of concurrent builds that are allowed for this project"
},
"tags": {
"type": "array",
"title": "Tags",
"description": "Tags associated with the CodeBuild project",
"items": {
"type": "object"
}
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"account": {
"title": "Account",
"target": "awsAccount",
"required": false,
"many": false
}
}
}
CodeBuild Project mapping configuration (click to expand)
resources:
- kind: AWS::CodeBuild::Project
selector:
query: 'true'
port:
entity:
mappings:
identifier: .Properties.Arn
title: .Properties.Name
blueprint: '"codeBuildProject"'
properties:
name: .Properties.Name
arn: .Properties.Arn
description: .Properties.Description
serviceRole: .Properties.ServiceRole
timeoutInMinutes: .Properties.TimeoutInMinutes
queuedTimeoutInMinutes: .Properties.QueuedTimeoutInMinutes
encryptionKey: .Properties.EncryptionKey
environment: .Properties.Environment
source: .Properties.Source
artifacts: .Properties.Artifacts
created: .Properties.Created
lastModified: .Properties.LastModified
projectVisibility: .Properties.ProjectVisibility
concurrentBuildLimit: .Properties.ConcurrentBuildLimit
tags: .Properties.Tags
relations:
account: .__ExtraContext.AccountId

AWS::CodeBuild::BuildRun​

The following example demonstrates how to ingest your AWS CodeBuild build runs to Port.

CodeBuild Build Run supported actions​

The table below summarizes the available actions for ingesting AWS CodeBuild Build Run resources in Port:

ActionDescriptionTypeRequired AWS Permission
ListBuildsActionDiscover build run IDs in the account.Defaultcodebuild:ListBuilds
GetBuildDetailsActionRetrieve detailed build run data such as status, phase, and timing.Defaultcodebuild:BatchGetBuilds
All properties available by default

CodeBuild build runs expose their key properties via the default ListBuildsAction and GetBuildDetailsAction.

You can use the following Port blueprint definitions and integration configuration:

CodeBuild Build Run blueprint (click to expand)
{
"identifier": "codeBuildBuildRun",
"title": "CodeBuild Build Run",
"icon": "AWS",
"schema": {
"properties": {
"arn": {
"type": "string",
"title": "ARN",
"description": "The Amazon Resource Name (ARN) of the build run"
},
"projectName": {
"type": "string",
"title": "Project Name",
"description": "The name of the CodeBuild project"
},
"buildNumber": {
"type": "number",
"title": "Build Number",
"description": "The build number"
},
"buildStatus": {
"type": "string",
"title": "Build Status",
"description": "The current status of the build",
"enum": [
"SUCCEEDED",
"FAILED",
"FAULT",
"TIMED_OUT",
"IN_PROGRESS",
"STOPPED"
]
},
"currentPhase": {
"type": "string",
"title": "Current Phase",
"description": "The current phase of the build"
},
"startTime": {
"type": "string",
"title": "Start Time",
"description": "The time the build started",
"format": "date-time"
},
"endTime": {
"type": "string",
"title": "End Time",
"description": "The time the build ended",
"format": "date-time"
},
"sourceVersion": {
"type": "string",
"title": "Source Version",
"description": "The version of the source code"
},
"buildComplete": {
"type": "boolean",
"title": "Build Complete",
"description": "Whether the build is complete"
},
"initiator": {
"type": "string",
"title": "Initiator",
"description": "The entity that initiated the build"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"account": {
"title": "Account",
"target": "awsAccount",
"required": false,
"many": false
}
}
}
CodeBuild Build Run mapping configuration (click to expand)
resources:
- kind: AWS::CodeBuild::BuildRun
selector:
query: 'true'
port:
entity:
mappings:
identifier: .Properties.Id
title: .Properties.ProjectName + " - Build " + (.Properties.BuildNumber | tostring)
blueprint: '"codeBuildBuildRun"'
properties:
arn: .Properties.Arn
projectName: .Properties.ProjectName
buildNumber: .Properties.BuildNumber
buildStatus: .Properties.BuildStatus
currentPhase: .Properties.CurrentPhase
startTime: .Properties.StartTime
endTime: .Properties.EndTime
sourceVersion: .Properties.SourceVersion
buildComplete: .Properties.BuildComplete
initiator: .Properties.Initiator
relations:
account: .__ExtraContext.AccountId

For more details about CodeBuild properties, refer to the AWS CodeBuild API documentation.