-
Notifications
You must be signed in to change notification settings - Fork 4.1k
feat(pipelines): actions can default to the pipeline service role instead of a newly created role #33991
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
Conversation
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.
(This review is outdated)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33991 +/- ##
=======================================
Coverage 83.98% 83.98%
=======================================
Files 120 120
Lines 6976 6976
Branches 1178 1178
=======================================
Hits 5859 5859
Misses 1005 1005
Partials 112 112
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
usePipelineRoleForActions
field support in L3 construct
usePipelineRoleForActions
field support in L3 constructusePipelineRoleForActions
field support in L3 construct
✅ 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.
minor comments, otherwise looks good
@@ -1,3 +1,4 @@ | |||
/* eslint-disable no-console */ |
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.
these consoles are all debugs right? at any rate we can't console.log like this :)
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.
lol forgot to delete after debuging
/** | ||
* Allow no-actionRole-configured actions use pipeline service role | ||
*/ | ||
public readonly usePipelineRoleForActions: boolean; |
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.
/** | |
* Allow no-actionRole-configured actions use pipeline service role | |
*/ | |
public readonly usePipelineRoleForActions: boolean; | |
/** | |
* Allow no-actionRole-configured actions to use the pipeline service role | |
* instead of creating a new role for each action | |
*/ | |
public readonly usePipelineRoleForActions: boolean; |
is no-actionRole-configured
a thing you are referencing? otherwise not sure why its hyphenated.
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.
I'll revise it
// input: pipelines.CodePipelineSource.gitHub('cdklabs/construct-hub-probe', 'main', { | ||
// trigger: GitHubTrigger.POLL, | ||
// }), |
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.
delete?
@@ -976,6 +976,10 @@ Note that if you provide an existing pipeline, you cannot provide values for | |||
`pipelineName`, `crossAccountKeys`, `reuseCrossRegionSupportStacks`, or `role` | |||
because those values are passed in directly to the underlying `codepipeline.Pipeline`. | |||
|
|||
### Use pipeline service role as default action role in pipeline | |||
|
|||
If you don't want cdk helps you automatically create roles for each actions(like CodeBuild step ,etc.),you could set `usePipelineServiceRoleForActions` as true to use pipeline service role as default action role in Codepipeline if no action role provided. |
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.
If you don't want cdk helps you automatically create roles for each actions(like CodeBuild step ,etc.),you could set `usePipelineServiceRoleForActions` as true to use pipeline service role as default action role in Codepipeline if no action role provided. | |
By default CDK automatically creates roles for each action (`CodeBuildStep`, etc). | |
If you prefer to use the pipeline service role as default instead, set the `usePipelineRoleForActions` property. | |
This will tell CDK to default to the pipeline service role in AWS CodePipeline if no action role is provided. |
usePipelineRoleForActions
field support in L3 construct
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). |
Comments on closed issues and PRs are hard for our team to see. |
Issue # 27065
#27605
Reason for this change
Lots of customer reported they don't want such many new roles generated in cdk level.
Current cdk library will help customer to generate a action role if no role configured.
But in Codepipeline backend logic, the pipeline service role will be used as default action role, which the cdk library doesn't align.
Description of changes
Support this field in L3 construct. L2 construct support has been delivered: d8bbc1c
Describe any new or updated permissions being added
No
Description of how you validated changes
Local deployment/unit test/integ test
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license