Skip to content
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(codebuild): add support of organization webhook in github source #31740

Merged
merged 29 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
07b8637
Add support for github organization webhooks
dviryamin Oct 11, 2024
e293c53
Update README
dviryamin Oct 11, 2024
6347928
Add organization webhook test
dviryamin Oct 12, 2024
e075a94
Merge branch 'main' into organization-webhook
dviryamin Oct 12, 2024
974a3b1
Fix webhook filters
dviryamin Oct 12, 2024
eb2ad23
Fix webhook filters
dviryamin Oct 12, 2024
239bc1b
Add integration test
dviryamin Oct 12, 2024
fad2212
Fix diff in integration tests
dviryamin Oct 14, 2024
8fcecef
Merge branch 'main' into organization-webhook
dviryamin Oct 16, 2024
b43a9de
Update integration test
dviryamin Oct 16, 2024
8169b82
Update integration test
dviryamin Oct 16, 2024
0b1867c
Update integration tests
dviryamin Oct 16, 2024
19e7884
Merge branch 'main' into organization-webhook
dviryamin Oct 17, 2024
09f3024
Merge branch 'main' into organization-webhook
dviryamin Oct 17, 2024
cdb491d
Merge branch 'main' into organization-webhook
dviryamin Oct 19, 2024
ba7496d
Merge branch 'main' into organization-webhook
dviryamin Oct 22, 2024
c870d36
Merge branch 'main' into organization-webhook
dviryamin Oct 22, 2024
1c21723
Merge branch 'main' into organization-webhook
dviryamin Oct 23, 2024
cdc704f
Merge branch 'main' into organization-webhook
dviryamin Oct 24, 2024
2de92fd
Merge branch 'main' into organization-webhook
dviryamin Oct 24, 2024
ebc4c9c
Update github project default image in integration test
dviryamin Oct 24, 2024
da7f567
revert manually update template
dviryamin Oct 24, 2024
a972825
Try update template again
dviryamin Oct 24, 2024
e84ae63
Merge branch 'main' into organization-webhook
dviryamin Oct 24, 2024
0772096
Merge branch 'main' into organization-webhook
dviryamin Oct 25, 2024
c6f44cc
Merge branch 'main' into organization-webhook
dviryamin Oct 25, 2024
c8c5f0b
Add tests for filtergroups using organization webhook
dviryamin Oct 26, 2024
6cf830d
Merge branch 'main' into organization-webhook
dviryamin Oct 26, 2024
12d9825
Merge branch 'main' into organization-webhook
mergify[bot] Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
{
"Resources": {
"MyProjectRole9BBE5233": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "codebuild.amazonaws.com"
}
}
],
"Version": "2012-10-17"
}
}
},
"MyProjectRoleDefaultPolicyB19B7C29": {
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyDocument": {
"Statement": [
{
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Effect": "Allow",
"Resource": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":logs:",
{
"Ref": "AWS::Region"
},
":",
{
"Ref": "AWS::AccountId"
},
":log-group:/aws/codebuild/",
{
"Ref": "MyProject39F7B0AE"
},
":*"
]
]
},
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":logs:",
{
"Ref": "AWS::Region"
},
":",
{
"Ref": "AWS::AccountId"
},
":log-group:/aws/codebuild/",
{
"Ref": "MyProject39F7B0AE"
}
]
]
}
]
}
],
"Version": "2012-10-17"
},
"PolicyName": "MyProjectRoleDefaultPolicyB19B7C29",
"Roles": [
{
"Ref": "MyProjectRole9BBE5233"
}
]
}
},
"MyProject39F7B0AE": {
"Type": "AWS::CodeBuild::Project",
"Properties": {
"Artifacts": {
"Type": "NO_ARTIFACTS"
},
"Cache": {
"Type": "NO_CACHE"
},
"EncryptionKey": "alias/aws/s3",
"Environment": {
"ComputeType": "BUILD_GENERAL1_SMALL",
"Image": "aws/codebuild/standard:7.0",
"ImagePullCredentialsType": "CODEBUILD",
"PrivilegedMode": false,
"Type": "LINUX_CONTAINER"
},
"ServiceRole": {
"Fn::GetAtt": [
"MyProjectRole9BBE5233",
"Arn"
]
},
"Source": {
"Location": "CODEBUILD_DEFAULT_WEBHOOK_SOURCE_LOCATION",
"ReportBuildStatus": false,
"Type": "GITHUB"
},
"Triggers": {
"FilterGroups": [
[
{
"Pattern": "WORKFLOW_JOB_QUEUED",
"Type": "EVENT"
},
{
"Pattern": "aws-cdk.*",
"Type": "REPOSITORY_NAME"
},
{
"ExcludeMatchedPattern": true,
"Pattern": "aws-cdk-lib",
"Type": "REPOSITORY_NAME"
}
]
],
"ScopeConfiguration": {
"Name": "aws"
},
"Webhook": true
}
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading