-
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(codepipeline-actions): support commands action #31667
base: main
Are you sure you want to change the base?
Conversation
add module code
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.
@@ -13,6 +13,7 @@ export enum ActionCategory { | |||
APPROVAL = 'Approval', | |||
DEPLOY = 'Deploy', | |||
INVOKE = 'Invoke', | |||
COMPUTE = 'Compute', |
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.
// To put the logs in the log group | ||
// see: https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-Commands.html#action-reference-Commands-policy | ||
'logs:CreateLogGroup', | ||
'logs:CreateLogStream', | ||
'logs:PutLogEvents', |
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.
// To view the logs in the Commands action on the CodePipeline console | ||
// see: https://docs.aws.amazon.com/codepipeline/latest/userguide/security-iam-permissions-console-logs.html | ||
'logs:GetLogEvents', |
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.
|
||
/** | ||
* Shell commands for the Commands action to run. | ||
* | ||
* @default - no commands | ||
*/ | ||
readonly commands?: string[]; | ||
|
||
/** | ||
* The names of the variables in your environment that you want to export. | ||
* | ||
* @default - no output variables | ||
*/ | ||
readonly outputVariables?: string[]; |
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.
* @param files file paths that you want to export as output artifacts for the action. (can only be used in artifacts for `CommandAction`) | ||
*/ | ||
public static artifact(name: string): Artifact { | ||
return new Artifact(name); | ||
public static artifact(name: string, files?: string[]): Artifact { | ||
return new Artifact(name, files); |
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 CodeBuild run under the CommandsAction. But I don't automatically add the permissions for source services with Because an error occurred in the CommandsAction with |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue # (if applicable)
Closes #31666.
Reason for this change
AWS CodePipeline introduces new general purpose compute action: Commands action.
This action can be used for both V1 and V2 pipeline types.
CFn docs:
Description of changes
Added
CommandsAction
class and changed other files.The
ActionCategory
for this action is a new categoryCompute
, so addedActionCategory.COMPUTE
.Description of how you validated changes
Both unit and integ tests
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license