-
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(codepipeline-actions): native Amazon EC2 deployment support #33604
base: main
Are you sure you want to change the base?
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.
contains 3 files:
index.html
- fetched on assertionsscripts/pre-deploy.sh
- specified aspreScript
; just runstrue
scripts/post-deploy.sh
- specified aspostScript
; just runstrue
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33604 +/- ##
=======================================
Coverage 82.21% 82.21%
=======================================
Files 119 119
Lines 6876 6876
Branches 1162 1162
=======================================
Hits 5653 5653
Misses 1120 1120
Partials 103 103
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/** | ||
* Max number of instances. | ||
* | ||
* Valid range: from 1 to number of your instances |
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.
/** | ||
* Max percentage of instances. | ||
* | ||
* Valid range: from 1 to 99 |
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.
TargetDirectory: this.props.targetDirectory, | ||
MaxBatch: this.props.maxBatch?.value, | ||
MaxError: this.props.maxError?.value, | ||
TargetGroupNameList: this.props.targetGroups?.length ? this.props.targetGroups.map((tg) => tg.targetGroupName).join(',') : undefined, |
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 (!Token.isUnresolved(percentage) && !(percentage >= 1 && percentage <= 99 && Number.isInteger(percentage))) { | ||
throw new UnscopedValidationError(`percentage must be a positive integer between 1 and 99. got ${percentage}`); | ||
} | ||
return { value: `${Tokenization.stringifyNumber(percentage)}%` }; |
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.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
if ( | ||
props.maxBatch && props.maxError && | ||
!Token.isUnresolved(props.maxBatch.value) && !Token.isUnresolved(props.maxError.value) && | ||
props.maxBatch.value.endsWith('%') === props.maxError.value.endsWith('%') && | ||
parseInt(props.maxBatch.value, 10) <= parseInt(props.maxError.value, 10) | ||
) { | ||
throw new UnscopedValidationError(`The maxError must be less than the maxBatch ${props.maxBatch.value}. got ${props.maxError.value}`); | ||
} |
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.
Issue # (if applicable)
Closes #33584.
Reason for this change
AWS CodePipeline introduces a new action to deploy to Amazon Elastic Compute Cloud (EC2).
https://aws.amazon.com/about-aws/whats-new/2025/02/aws-codepipeline-native-ec2-deployment-support/
Description of changes
Added
Ec2DeployAction
action class.Usage:
Describe any new or updated permissions being added
Ec2DeployAction
adds permissions based on CodePipeline documentation:https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-EC2Deploy.html#action-reference-EC2Deploy-permissions-action
Description of how you validated changes
Unit tests and an integ test.
The integ test also asserts pipeline execution.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license