-
Notifications
You must be signed in to change notification settings - Fork 4k
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): Add logging options to codeBuildDefaults property #24016
Changes from 5 commits
eb8d322
29862e4
b7a33b6
b62941f
1c8bb29
4bad59a
ddda736
643ea84
a246aaf
371947c
b6eced5
eefc182
99a1f4b
5294546
e4a5489
e727968
37dfe9b
068b134
fa62b63
af0a783
05cd3ff
0e970f5
355f431
d88ba34
972f538
67e6021
42663ed
cc1bce3
66c297b
3ec34d6
244159e
bc80027
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as codebuild from '@aws-cdk/aws-codebuild'; | ||
|
||
export function mergeLoggings(a: codebuild.LoggingOptions, b?: codebuild.LoggingOptions): codebuild.LoggingOptions | undefined; | ||
export function mergeLoggings(a: codebuild.LoggingOptions | undefined, b: codebuild.LoggingOptions): codebuild.LoggingOptions | undefined; | ||
export function mergeLoggings(a?: codebuild.LoggingOptions, b?: codebuild.LoggingOptions): codebuild.LoggingOptions | undefined; | ||
export function mergeLoggings(a?: codebuild.LoggingOptions, b?: codebuild.LoggingOptions) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add spacing between these for my delicate eyeballs, please. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Granted, with my suggestions above, these might not be needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any suggestion for a coding style? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you know, I didn't even notice that it was an overloaded function because I reacted too quickly to the spacing issue. This is appropriate and my eyeballs will deal, lol. |
||
const cloudWatch = b?.cloudWatch ?? a?.cloudWatch; | ||
const s3 = b?.s3 ?? a?.s3; | ||
|
||
if (!cloudWatch && !s3) { | ||
return undefined; | ||
} | ||
|
||
return { | ||
cloudWatch: (cloudWatch?.enabled && !cloudWatch?.logGroup) ? undefined : cloudWatch, | ||
s3: s3, | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"version": "29.0.0", | ||
"files": { | ||
"d99681b07ca842e41d76f0e1de1c36e98184be62476be52ea702af467851166d": { | ||
"source": { | ||
"path": "LoggingPipelineStack.template.json", | ||
"packaging": "file" | ||
}, | ||
"destinations": { | ||
"current_account-current_region": { | ||
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", | ||
"objectKey": "d99681b07ca842e41d76f0e1de1c36e98184be62476be52ea702af467851166d.json", | ||
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" | ||
} | ||
} | ||
} | ||
}, | ||
"dockerImages": {} | ||
} |
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.
My comment above may mean refactoring
LoggingOptions
instead of building a new interface for this specifically. In fact, that's probably the best path forward. We could improve this experience in general.