1 Answer
- Newest
- Most votes
- Most comments
0
CodeBuild build triggers are simply CloudWatch event rules.
When creating build triggers through the console, what is actually being created is a CloudWatch event rule. You can create CloudWatch event rules using the CLI, for example:
aws events put-rule \
--name run-codebuild \
--schedule-expression 'rate(1 hour)' \
--role-arn arn:aws:iam::000000000000:role/service-role/AWS_Events_Invoke_CodeBuild_124052220
aws events put-targets \
--rule run-codebuild \
--targets '
[
{
"Id": "some_id",
"Arn": "arn:aws:codebuild:us-east-1:000000000000:project/some-codebuild-project",
"RoleArn": "arn:aws:iam::000000000000:role/service-role/codebuild-some-codebuild-project-service-role"
}
]
'
If the CW event rule is associated with a CodeBuild project, that event rule will show up under the project's build triggers.
Relevant content
- asked a year ago
- asked 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago