-
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): GitPushFilter
with branches and file paths for trigger
#29127
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.
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.
a0b62b9
to
7007369
Compare
fix unit tests fix unit tests
7007369
to
8ebad4e
Compare
The triggers can only be used with pipeline type V2. | ||
|
||
### Push filter |
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.
Not separated here by the chapters "Tags" and "Branches" to add pull request filters in the PR.
26c0606
to
74820d8
Compare
GitPushFilter
with branches and file paths for trigger
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
if (!filter.branchesExcludes && !filter.branchesIncludes && (filter.filePathsExcludes || filter.filePathsIncludes)) { | ||
throw new Error(`cannot specify filePaths without branches in pushFilter for sourceAction with name '${sourceAction.actionProperties.actionName}'`); | ||
} |
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 there is no this validation, the error occurred in CFn: The trigger configuration for the source action is not valid. Make sure to choose valid filter combinations.
.
In addition, the file paths in the Branch
is optional in the AWS console.
if ((filter.tagsExcludes || filter.tagsIncludes) && (filter.branchesExcludes || filter.branchesIncludes)) { | ||
throw new Error(`cannot specify both tags and branches in pushFilter for sourceAction with name '${sourceAction.actionProperties.actionName}'`); | ||
} |
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 there is no this validation, the error occurred in CFn: The trigger configuration for the source action is not valid. Make sure to choose valid filter combinations.
.
In addition, we can only choose tags or branches (with file paths) in the AWS console.
if (!filter.tagsExcludes && !filter.tagsIncludes && !filter.branchesExcludes && !filter.branchesIncludes) { | ||
throw new Error(`must specify either tags or branches in pushFilter for sourceAction with name '${sourceAction.actionProperties.actionName}'`); | ||
} |
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 there is no this validation, the error occurred in CFn: The trigger configuration for the source action is not valid. Make sure to choose valid filter combinations.
.
8f0d1ce
to
dd62773
Compare
add unit test change unit test order
Been here for a while, looks ready, this PR needs some love :) ! Any ETA please? |
Could you please take a look at 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.
LGTM, thanks for this great work and sorry for the wait!
Thanks for your approval. Could you please detach the 'do-not-merge' label, and merge the PR? |
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). |
The merge seems to have failed. Could you please retry? |
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). |
Why was it reverted? |
I was really looking forward to this PR being released in the next version. 😭 |
That is really unfortunate. I'm in the process of asking the maintainer. |
…trigger (aws#29127) ### Issue # (if applicable) Closes aws#29124 Related PR: aws#29128 Perhaps if one merges, the other will cause a conflict. ### Reason for this change We would be good to trigger pipelines by GitPushFilter with branches and file paths. - CFn docs - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-gitpushfilter.html - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-gitbranchfiltercriteria.html - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-gitfilepathfiltercriteria.html ### Description of changes Add props: - branchesExcludes - branchesIncludes - filePathsExcludes - filePathsIncludes ### Description of how you validated changes Both unit and integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…trigger (aws#29127) ### Issue # (if applicable) Closes aws#29124 Related PR: aws#29128 Perhaps if one merges, the other will cause a conflict. ### Reason for this change We would be good to trigger pipelines by GitPushFilter with branches and file paths. - CFn docs - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-gitpushfilter.html - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-gitbranchfiltercriteria.html - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-gitfilepathfiltercriteria.html ### Description of changes Add props: - branchesExcludes - branchesIncludes - filePathsExcludes - filePathsIncludes ### Description of how you validated changes Both unit and integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…trigger (aws#29127) ### Issue # (if applicable) Closes aws#29124 Related PR: aws#29128 Perhaps if one merges, the other will cause a conflict. ### Reason for this change We would be good to trigger pipelines by GitPushFilter with branches and file paths. - CFn docs - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-gitpushfilter.html - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-gitbranchfiltercriteria.html - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-gitfilepathfiltercriteria.html ### Description of changes Add props: - branchesExcludes - branchesIncludes - filePathsExcludes - filePathsIncludes ### Description of how you validated changes Both unit and integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Issue # (if applicable)
Closes #29124
Related PR: #29128
Perhaps if one merges, the other will cause a conflict.
Reason for this change
We would be good to trigger pipelines by GitPushFilter with branches and file paths.
Description of changes
Add props:
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