Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS::CodeBuild::Project - Add AutoRetryLimit #2170

Closed
mdgm88 opened this issue Oct 26, 2024 · 3 comments
Closed

AWS::CodeBuild::Project - Add AutoRetryLimit #2170

mdgm88 opened this issue Oct 26, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@mdgm88
Copy link

mdgm88 commented Oct 26, 2024

Name of the resource

AWS::CodeBuild::Project

Resource name

No response

Description

A new feature has been added to the SDK to set the AutoRetryLimit for a CodeBuild Project: https://docs.aws.amazon.com/codebuild/latest/userguide/auto-retry-build.html

It would be nice if support for this was added to AWS::CodeBuild::Project so we can use IaC to configure this new feature

Other Details

No response

@mdgm88 mdgm88 added the enhancement New feature or request label Oct 26, 2024
@colyoonamaz
Copy link

It seems like this feature is currently supported within CFN, but the documentation is slightly out of date. You can create a CodeBuild project with an AutoRetryLimit using the following template:

Resources:
  CodeBuildProject:
    Type: AWS::CodeBuild::Project
    Properties:
      Name: AutoRetryProject
      ServiceRole: <Service Role>
      Artifacts:
        Type: NO_ARTIFACTS
      Environment:
        Type: LINUX_CONTAINER
        ComputeType: BUILD_GENERAL1_SMALL
        Image: aws/codebuild/standard:1.0
      AutoRetryLimit: 3
      Source:
        Type: GITHUB
        Location: <Source Location>

@mdgm88
Copy link
Author

mdgm88 commented Nov 3, 2024

Thanks. That works, however cfn-lint sees it as invalid. Will need to raise a separate request on that repo

@mdgm88
Copy link
Author

mdgm88 commented Nov 3, 2024

Raised aws-cloudformation/cfn-lint#3808

mergify bot pushed a commit to aws/aws-cdk that referenced this issue Dec 16, 2024
### Issue # (if applicable)

N/A

### Reason for this change
To support auto retry limit in CodeBuild project.
https://aws.amazon.com/about-aws/whats-new/2024/10/aws-codebuild-retrying-builds-automatically/

**Note** 
This feature is already in CFn and L1 Constructs.
aws-cloudformation/cloudformation-coverage-roadmap#2170
#32446

But not documented in CFn docs.



### Description of changes
Add `autoRetryLimit` property.



### Description of how you validated changes
Add an unit test and an integ test.



### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants