Skip to content

Commit 8c85f33

Browse files
authored
Update CodeBuild CF stack template to add disabled encryption and remove webhook Booleans (#4243)
* Remove webhook/triggers from CodeBuild CF stack template * Disable artifact encryption on CodeBuild devbuild stack template * Remove trailing space on EcryptionDisabled lines
1 parent 302c210 commit 8c85f33

File tree

1 file changed

+9
-57
lines changed

1 file changed

+9
-57
lines changed

build-infrastructure/codebuild-devbuild-stack.yml

Lines changed: 9 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Resources:
2323
Type: 'AWS::CodeBuild::Project'
2424
Properties:
2525
Artifacts:
26+
EncryptionDisabled: true
2627
Location: !Ref BuildBucketName
2728
NamespaceType: NONE
2829
OverrideArtifactName: true
@@ -46,18 +47,12 @@ Resources:
4647
Location: !Ref GithubFullRepoName
4748
Type: GITHUB
4849
TimeoutInMinutes: 60
49-
Triggers:
50-
BuildType: BUILD
51-
# Config list of developers allowlisted to create builds when creating PRs to GithubBranchName
52-
# This allow list can be modified using aws-cli or aws-sdk
53-
# CodeBuild also supports pattern matches using regex, but this is not useful for listing different Github IDs
54-
# so they have to be listed separately
55-
Webhook: true
5650
Visibility: PRIVATE
5751
UbuntuArmProject:
5852
Type: 'AWS::CodeBuild::Project'
5953
Properties:
6054
Artifacts:
55+
EncryptionDisabled: true
6156
Location: !Ref BuildBucketName
6257
NamespaceType: NONE
6358
OverrideArtifactName: true
@@ -81,18 +76,12 @@ Resources:
8176
Location: !Ref GithubFullRepoName
8277
Type: GITHUB
8378
TimeoutInMinutes: 60
84-
Triggers:
85-
BuildType: BUILD
86-
# Config list of developers allowlisted to create builds when creating PRs to GithubBranchName
87-
# This allow list can be modified using aws-cli or aws-sdk
88-
# CodeBuild also supports pattern matches using regex, but this is not useful for listing different Github IDs
89-
# so they have to be listed separately
90-
Webhook: true
9179
Visibility: PRIVATE
9280
ArmProject:
9381
Type: 'AWS::CodeBuild::Project'
9482
Properties:
9583
Artifacts:
84+
EncryptionDisabled: true
9685
Location: !Ref BuildBucketName
9786
NamespaceType: NONE
9887
OverrideArtifactName: true
@@ -116,18 +105,12 @@ Resources:
116105
Location: !Ref GithubFullRepoName
117106
Type: GITHUB
118107
TimeoutInMinutes: 60
119-
Triggers:
120-
BuildType: BUILD
121-
# Config list of developers allowlisted to create builds when creating PRs to GithubBranchName
122-
# This allow list can be modified using aws-cli or aws-sdk
123-
# CodeBuild also supports pattern matches using regex, but this is not useful for listing different Github IDs
124-
# so they have to be listed separately
125-
Webhook: true
126108
Visibility: PRIVATE
127109
AmdProject:
128110
Type: 'AWS::CodeBuild::Project'
129111
Properties:
130112
Artifacts:
113+
EncryptionDisabled: true
131114
Location: !Ref BuildBucketName
132115
NamespaceType: NONE
133116
OverrideArtifactName: true
@@ -151,20 +134,14 @@ Resources:
151134
Location: !Ref GithubFullRepoName
152135
Type: GITHUB
153136
TimeoutInMinutes: 60
154-
Triggers:
155-
BuildType: BUILD
156-
# Config list of developers allowlisted to create builds when creating PRs to GithubBranchName
157-
# This allow list can be modified using aws-cli or aws-sdk
158-
# CodeBuild also supports pattern matches using regex, but this is not useful for listing different Github IDs
159-
# so they have to be listed separately
160-
Webhook: true
161137
Visibility: PRIVATE
162138

163139
# Creates a CodeBuild project for Amazon Linux 2 ARM
164140
Amzn2ArmProject:
165141
Type: 'AWS::CodeBuild::Project'
166142
Properties:
167143
Artifacts:
144+
EncryptionDisabled: true
168145
Location: !Ref BuildBucketName
169146
NamespaceType: NONE
170147
OverrideArtifactName: true
@@ -188,20 +165,14 @@ Resources:
188165
Location: !Ref GithubFullRepoName
189166
Type: GITHUB
190167
TimeoutInMinutes: 60
191-
Triggers:
192-
BuildType: BUILD
193-
# Config list of developers allowlisted to create builds when creating PRs to GithubBranchName
194-
# This allow list can be modified using aws-cli or aws-sdk
195-
# CodeBuild also supports pattern matches using regex, but this is not useful for listing different Github IDs
196-
# so they have to be listed separately
197-
Webhook: true
198168
Visibility: PRIVATE
199169

200170
# Creates a CodeBuild project for Amazon Linux 2 AMD
201171
Amzn2AmdProject:
202172
Type: 'AWS::CodeBuild::Project'
203173
Properties:
204174
Artifacts:
175+
EncryptionDisabled: true
205176
Location: !Ref BuildBucketName
206177
NamespaceType: NONE
207178
OverrideArtifactName: true
@@ -225,20 +196,14 @@ Resources:
225196
Location: !Ref GithubFullRepoName
226197
Type: GITHUB
227198
TimeoutInMinutes: 60
228-
Triggers:
229-
BuildType: BUILD
230-
# Config list of developers allowlisted to create builds when creating PRs to GithubBranchName
231-
# This allow list can be modified using aws-cli or aws-sdk
232-
# CodeBuild also supports pattern matches using regex, but this is not useful for listing different Github IDs
233-
# so they have to be listed separately
234-
Webhook: true
235199
Visibility: PRIVATE
236200

237201
# Creates a CodeBuild project for Amazon Linux 2023 ARM
238202
Amzn2023ArmProject:
239203
Type: 'AWS::CodeBuild::Project'
240204
Properties:
241205
Artifacts:
206+
EncryptionDisabled: true
242207
Location: !Ref BuildBucketName
243208
NamespaceType: NONE
244209
OverrideArtifactName: true
@@ -262,20 +227,14 @@ Resources:
262227
Location: !Ref GithubFullRepoName
263228
Type: GITHUB
264229
TimeoutInMinutes: 60
265-
Triggers:
266-
BuildType: BUILD
267-
# Config list of developers allowlisted to create builds when creating PRs to GithubBranchName
268-
# This allow list can be modified using aws-cli or aws-sdk
269-
# CodeBuild also supports pattern matches using regex, but this is not useful for listing different Github IDs
270-
# so they have to be listed separately
271-
Webhook: true
272230
Visibility: PRIVATE
273231

274232
# Creates a CodeBuild project for Amazon Linux 2023 AMD
275233
Amzn2023AmdProject:
276234
Type: 'AWS::CodeBuild::Project'
277235
Properties:
278236
Artifacts:
237+
EncryptionDisabled : true
279238
Location: !Ref BuildBucketName
280239
NamespaceType: NONE
281240
OverrideArtifactName: true
@@ -299,13 +258,6 @@ Resources:
299258
Location: !Ref GithubFullRepoName
300259
Type: GITHUB
301260
TimeoutInMinutes: 60
302-
Triggers:
303-
BuildType: BUILD
304-
# Config list of developers allowlisted to create builds when creating PRs to GithubBranchName
305-
# This allow list can be modified using aws-cli or aws-sdk
306-
# CodeBuild also supports pattern matches using regex, but this is not useful for listing different Github IDs
307-
# so they have to be listed separately
308-
Webhook: true
309261
Visibility: PRIVATE
310262

311263
# Defines the service roles for the CodeBuild projects
@@ -652,4 +604,4 @@ Resources:
652604
- 's3:GetBucketAcl'
653605
- 's3:GetBucketLocation'
654606
PolicyName: !Sub '${AWS::StackName}-ServicePolicyAmzn2023Amd'
655-
RoleName: !Sub '${AWS::StackName}-ServiceRoleAmzn2023Amd'
607+
RoleName: !Sub '${AWS::StackName}-ServiceRoleAmzn2023Amd'

0 commit comments

Comments
 (0)