-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(pipelines): added logging as option for codeBuildDefaults prop on CodePipeline construct #25266
Conversation
…cloudwatch logs creation during codebuild step Signed-off-by: Francis <[email protected]>
…ldStep class Signed-off-by: Francis <[email protected]>
Signed-off-by: Francis <[email protected]>
…codebuild projects Signed-off-by: Francis <[email protected]>
…es instead of s3 resources Signed-off-by: Francis <[email protected]>
Signed-off-by: Francis <[email protected]>
… for codebuild logging Signed-off-by: Francis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
Signed-off-by: Francis <[email protected]>
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job @colifran 🚀
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…n CodePipeline construct (#25266) ## Motivation: Logging is an optional prop as part of the Project construct in the aws-codebuild module. Users can link a codebuild action when as part of their CodePipeline with codebuild options being set via the codeBuildDefaults prop on the CodePipeline construct. Currently, there isn't any ability to enable logging for the codebuild action. This feature allows a user to enable logging as part of a linked codebuild action via S3, CloudWatch, or both. ## Use Case (from issue #22045): At my company we just enabled AWS Config and SecurityHub has generated a rule 'securityhub-codebuild-project-logging-enabled-abcxyz'. This rule states that all CodeBuild projects must have at least one logging option enabled. However the Build and Synth steps from the pipeline are always failing this check since the pipelines module doesn't allow specifying logging options on the nested CodeBuild projects. ## Testing: Unit testing was implemented to verify that the CloudFormation template would be synthesized correctly when logging selected as an option on the codeBuildDefaults prop for S3, CloudWatch, or both. Integration testing was implemented to verify that all resources would be successfully provisioned when a new CodePipeline is created with logging enabled for the codebuild action. Closes #22045 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Motivation:
Logging is an optional prop as part of the Project construct in the aws-codebuild module. Users can link a codebuild action when as part of their CodePipeline with codebuild options being set via the codeBuildDefaults prop on the CodePipeline construct. Currently, there isn't any ability to enable logging for the codebuild action. This feature allows a user to enable logging as part of a linked codebuild action via S3, CloudWatch, or both.
Use Case (from issue #22045):
At my company we just enabled AWS Config and SecurityHub has generated a rule 'securityhub-codebuild-project-logging-enabled-abcxyz'. This rule states that all CodeBuild projects must have at least one logging option enabled.
However the Build and Synth steps from the pipeline are always failing this check since the pipelines module doesn't allow specifying logging options on the nested CodeBuild projects.
Testing:
Unit testing was implemented to verify that the CloudFormation template would be synthesized correctly when logging selected as an option on the codeBuildDefaults prop for S3, CloudWatch, or both.
Integration testing was implemented to verify that all resources would be successfully provisioned when a new CodePipeline is created with logging enabled for the codebuild action.
Closes #22045
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license