Skip to content

Commit 1bacb69

Browse files
authored
feat(codebuild): adding project.visibility (#30103)
### Reason for this change missing property ### Description of changes https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.CfnProjectProps.html#visibility ### Description of how you validated changes done test and integ-test ### 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*
1 parent 5588694 commit 1bacb69

File tree

12 files changed

+936
-0
lines changed

12 files changed

+936
-0
lines changed

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-codebuild/test/integ.project-visibility.js.snapshot/VisibilityDefaultTestDeployAssert1C40A7EB.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-codebuild/test/integ.project-visibility.js.snapshot/VisibilityDefaultTestDeployAssert1C40A7EB.template.json

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-codebuild/test/integ.project-visibility.js.snapshot/cdk.out

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-codebuild/test/integ.project-visibility.js.snapshot/codebuild-visibility.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
{
2+
"Resources": {
3+
"MyBucketF68F3FF0": {
4+
"Type": "AWS::S3::Bucket",
5+
"UpdateReplacePolicy": "Delete",
6+
"DeletionPolicy": "Delete"
7+
},
8+
"MyProjectRole9BBE5233": {
9+
"Type": "AWS::IAM::Role",
10+
"Properties": {
11+
"AssumeRolePolicyDocument": {
12+
"Statement": [
13+
{
14+
"Action": "sts:AssumeRole",
15+
"Effect": "Allow",
16+
"Principal": {
17+
"Service": "codebuild.amazonaws.com"
18+
}
19+
}
20+
],
21+
"Version": "2012-10-17"
22+
}
23+
}
24+
},
25+
"MyProjectRoleDefaultPolicyB19B7C29": {
26+
"Type": "AWS::IAM::Policy",
27+
"Properties": {
28+
"PolicyDocument": {
29+
"Statement": [
30+
{
31+
"Action": [
32+
"s3:GetBucket*",
33+
"s3:GetObject*",
34+
"s3:List*"
35+
],
36+
"Effect": "Allow",
37+
"Resource": [
38+
{
39+
"Fn::GetAtt": [
40+
"MyBucketF68F3FF0",
41+
"Arn"
42+
]
43+
},
44+
{
45+
"Fn::Join": [
46+
"",
47+
[
48+
{
49+
"Fn::GetAtt": [
50+
"MyBucketF68F3FF0",
51+
"Arn"
52+
]
53+
},
54+
"/path/to/my/source.zip"
55+
]
56+
]
57+
}
58+
]
59+
},
60+
{
61+
"Action": [
62+
"logs:CreateLogGroup",
63+
"logs:CreateLogStream",
64+
"logs:PutLogEvents"
65+
],
66+
"Effect": "Allow",
67+
"Resource": [
68+
{
69+
"Fn::Join": [
70+
"",
71+
[
72+
"arn:",
73+
{
74+
"Ref": "AWS::Partition"
75+
},
76+
":logs:",
77+
{
78+
"Ref": "AWS::Region"
79+
},
80+
":",
81+
{
82+
"Ref": "AWS::AccountId"
83+
},
84+
":log-group:/aws/codebuild/",
85+
{
86+
"Ref": "MyProject39F7B0AE"
87+
},
88+
":*"
89+
]
90+
]
91+
},
92+
{
93+
"Fn::Join": [
94+
"",
95+
[
96+
"arn:",
97+
{
98+
"Ref": "AWS::Partition"
99+
},
100+
":logs:",
101+
{
102+
"Ref": "AWS::Region"
103+
},
104+
":",
105+
{
106+
"Ref": "AWS::AccountId"
107+
},
108+
":log-group:/aws/codebuild/",
109+
{
110+
"Ref": "MyProject39F7B0AE"
111+
}
112+
]
113+
]
114+
}
115+
]
116+
},
117+
{
118+
"Action": [
119+
"codebuild:BatchPutCodeCoverages",
120+
"codebuild:BatchPutTestCases",
121+
"codebuild:CreateReport",
122+
"codebuild:CreateReportGroup",
123+
"codebuild:UpdateReport"
124+
],
125+
"Effect": "Allow",
126+
"Resource": {
127+
"Fn::Join": [
128+
"",
129+
[
130+
"arn:",
131+
{
132+
"Ref": "AWS::Partition"
133+
},
134+
":codebuild:",
135+
{
136+
"Ref": "AWS::Region"
137+
},
138+
":",
139+
{
140+
"Ref": "AWS::AccountId"
141+
},
142+
":report-group/",
143+
{
144+
"Ref": "MyProject39F7B0AE"
145+
},
146+
"-*"
147+
]
148+
]
149+
}
150+
}
151+
],
152+
"Version": "2012-10-17"
153+
},
154+
"PolicyName": "MyProjectRoleDefaultPolicyB19B7C29",
155+
"Roles": [
156+
{
157+
"Ref": "MyProjectRole9BBE5233"
158+
}
159+
]
160+
}
161+
},
162+
"MyProject39F7B0AE": {
163+
"Type": "AWS::CodeBuild::Project",
164+
"Properties": {
165+
"Artifacts": {
166+
"Type": "NO_ARTIFACTS"
167+
},
168+
"Cache": {
169+
"Type": "NO_CACHE"
170+
},
171+
"EncryptionKey": "alias/aws/s3",
172+
"Environment": {
173+
"ComputeType": "BUILD_GENERAL1_SMALL",
174+
"Image": "aws/codebuild/standard:1.0",
175+
"ImagePullCredentialsType": "CODEBUILD",
176+
"PrivilegedMode": false,
177+
"Type": "LINUX_CONTAINER"
178+
},
179+
"ServiceRole": {
180+
"Fn::GetAtt": [
181+
"MyProjectRole9BBE5233",
182+
"Arn"
183+
]
184+
},
185+
"Source": {
186+
"Location": {
187+
"Fn::Join": [
188+
"",
189+
[
190+
{
191+
"Ref": "MyBucketF68F3FF0"
192+
},
193+
"/path/to/my/source.zip"
194+
]
195+
]
196+
},
197+
"Type": "S3"
198+
},
199+
"Visibility": "PUBLIC_READ"
200+
}
201+
}
202+
},
203+
"Parameters": {
204+
"BootstrapVersion": {
205+
"Type": "AWS::SSM::Parameter::Value<String>",
206+
"Default": "/cdk-bootstrap/hnb659fds/version",
207+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
208+
}
209+
},
210+
"Rules": {
211+
"CheckBootstrapVersion": {
212+
"Assertions": [
213+
{
214+
"Assert": {
215+
"Fn::Not": [
216+
{
217+
"Fn::Contains": [
218+
[
219+
"1",
220+
"2",
221+
"3",
222+
"4",
223+
"5"
224+
],
225+
{
226+
"Ref": "BootstrapVersion"
227+
}
228+
]
229+
}
230+
]
231+
},
232+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
233+
}
234+
]
235+
}
236+
}
237+
}

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-codebuild/test/integ.project-visibility.js.snapshot/integ.json

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)