Skip to content

Commit 331a8e9

Browse files
authored
ci: add task input validation (#586)
Prevent us from accidentally changing task inputs because this can break users. Runs the validation script as part of the tests. Would have prevented #572
1 parent 43f162e commit 331a8e9

File tree

3 files changed

+456
-1
lines changed

3 files changed

+456
-1
lines changed
Lines changed: 370 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,370 @@
1+
/**
2+
* This file keeps a record of task input names for each task. We validate the current task inputs
3+
* against this to guard against accidentally changing or removing the input tasks.
4+
* Example of this risk: https://github.com/aws/aws-toolkit-azure-devops/issues/572
5+
*
6+
* How to use this file:
7+
* - If you are adding a new input variable, no action is needed - it will be added automatically.
8+
* - This file is autogenerated by validate.ts. It should only be modified if you are intentionally
9+
* removing/renaming an input variable from a task, so that the validation script will pass.
10+
* Consider the migration strategies mentioned below, since this sort of change will break users.
11+
*
12+
* Migration Strategies:
13+
* - keep the old parameter but add the new parameter. You can read the new parameter first, then the old one.
14+
* - mark the display name of the old parameter *deprecated*, or hide it from visibily (needs verification)
15+
*/
16+
17+
export const records = {
18+
AWSCLI: [
19+
'awsCredentials',
20+
'regionName',
21+
'awsCommand',
22+
'awsSubCommand',
23+
'awsArguments',
24+
'failOnStandardError'
25+
],
26+
AWSPowerShellModuleScript: [
27+
'awsCredentials',
28+
'regionName',
29+
'arguments',
30+
'scriptType',
31+
'filePath',
32+
'inlineScript',
33+
'errorActionPreference',
34+
'failOnStderr',
35+
'ignoreLASTEXITCODE',
36+
'workingDirectory'
37+
],
38+
AWSShellScript: [
39+
'awsCredentials',
40+
'regionName',
41+
'arguments',
42+
'scriptType',
43+
'filePath',
44+
'inlineScript',
45+
'disableAutoCwd',
46+
'workingDirectory',
47+
'failOnStandardError'
48+
],
49+
BeanstalkCreateApplicationVersion: [
50+
'awsCredentials',
51+
'regionName',
52+
'applicationName',
53+
'applicationType',
54+
'webDeploymentArchive',
55+
'dotnetPublishPath',
56+
'deploymentBundleBucket',
57+
'deploymentBundleKey',
58+
'versionLabel',
59+
'description',
60+
'outputVariable',
61+
'logRequest',
62+
'logResponse'
63+
],
64+
BeanstalkDeployApplication: [
65+
'awsCredentials',
66+
'regionName',
67+
'applicationName',
68+
'environmentName',
69+
'applicationType',
70+
'webDeploymentArchive',
71+
'dotnetPublishPath',
72+
'deploymentBundleBucket',
73+
'deploymentBundleKey',
74+
'versionLabel',
75+
'description',
76+
'outputVariable',
77+
'eventPollingDelay',
78+
'logRequest',
79+
'logResponse'
80+
],
81+
CloudFormationCreateOrUpdateStack: [
82+
'awsCredentials',
83+
'regionName',
84+
'stackName',
85+
'templateSource',
86+
'templateFile',
87+
's3BucketName',
88+
's3ObjectKey',
89+
'templateUrl',
90+
'templateParametersSource',
91+
'templateParametersFile',
92+
'templateParameters',
93+
'useChangeSet',
94+
'changeSetName',
95+
'description',
96+
'includeNestedStacks',
97+
'autoExecuteChangeSet',
98+
'capabilityIAM',
99+
'capabilityNamedIAM',
100+
'capabilityAutoExpand',
101+
'roleARN',
102+
'resourceTypes',
103+
'notificationARNs',
104+
'tags',
105+
'monitorRollbackTriggers',
106+
'monitoringTimeInMinutes',
107+
'rollbackTriggerARNs',
108+
'onFailure',
109+
'disableRollback',
110+
'warnWhenNoWorkNeeded',
111+
'outputVariable',
112+
'captureStackOutputs',
113+
'captureAsSecuredVars',
114+
'timeoutInMins',
115+
'logRequest',
116+
'logResponse'
117+
],
118+
CloudFormationDeleteStack: [
119+
'awsCredentials',
120+
'regionName',
121+
'stackName',
122+
'logRequest',
123+
'logResponse'
124+
],
125+
CloudFormationExecuteChangeSet: [
126+
'awsCredentials',
127+
'regionName',
128+
'changeSetName',
129+
'stackName',
130+
'noFailOnEmptyChangeSet',
131+
'deleteEmptyChangeSet',
132+
'outputVariable',
133+
'captureStackOutputs',
134+
'captureAsSecuredVars',
135+
'logRequest',
136+
'logResponse'
137+
],
138+
CodeDeployDeployApplication: [
139+
'awsCredentials',
140+
'regionName',
141+
'applicationName',
142+
'deploymentGroupName',
143+
'deploymentRevisionSource',
144+
'revisionBundle',
145+
'bucketName',
146+
'bundlePrefix',
147+
'bundleKey',
148+
'filesAcl',
149+
'description',
150+
'fileExistsBehavior',
151+
'updateOutdatedInstancesOnly',
152+
'ignoreApplicationStopFailures',
153+
'timeoutInMins',
154+
'outputVariable',
155+
'logRequest',
156+
'logResponse'
157+
],
158+
ECRPullImage: [
159+
'awsCredentials',
160+
'regionName',
161+
'repository',
162+
'imageSource',
163+
'imageTag',
164+
'imageDigest',
165+
'outputVariable',
166+
'logRequest',
167+
'logResponse'
168+
],
169+
ECRPushImage: [
170+
'awsCredentials',
171+
'regionName',
172+
'imageSource',
173+
'sourceImageName',
174+
'sourceImageTag',
175+
'sourceImageId',
176+
'repositoryName',
177+
'pushTag',
178+
'autoCreateRepository',
179+
'forceDockerNamingConventions',
180+
'removeDockerImage',
181+
'outputVariable',
182+
'logRequest',
183+
'logResponse'
184+
],
185+
LambdaDeployFunction: [
186+
'awsCredentials',
187+
'regionName',
188+
'deploymentMode',
189+
'functionName',
190+
'description',
191+
'functionHandler',
192+
'runtime',
193+
'codeLocation',
194+
'localZipFile',
195+
's3Bucket',
196+
's3ObjectKey',
197+
's3ObjectVersion',
198+
'roleARN',
199+
'memorySize',
200+
'timeout',
201+
'publish',
202+
'layers',
203+
'deadLetterARN',
204+
'kmsKeyARN',
205+
'environment',
206+
'tags',
207+
'securityGroups',
208+
'subnets',
209+
'tracingConfig',
210+
'outputVariable',
211+
'logRequest',
212+
'logResponse'
213+
],
214+
LambdaInvokeFunction: [
215+
'awsCredentials',
216+
'regionName',
217+
'functionName',
218+
'payload',
219+
'invocationType',
220+
'outputVariable',
221+
'logType',
222+
'logRequest',
223+
'logResponse'
224+
],
225+
LambdaNETCoreDeploy: [
226+
'awsCredentials',
227+
'regionName',
228+
'command',
229+
'packageOnly',
230+
'packageOutputFile',
231+
'lambdaProjectPath',
232+
'functionName',
233+
'functionRole',
234+
'functionHandler',
235+
'functionMemory',
236+
'functionTimeout',
237+
'stackName',
238+
's3Bucket',
239+
's3Prefix',
240+
'additionalArgs'
241+
],
242+
S3Download: [
243+
'awsCredentials',
244+
'regionName',
245+
'bucketName',
246+
'sourceFolder',
247+
'globExpressions',
248+
'targetFolder',
249+
'keyManagement',
250+
'customerKey',
251+
'overwrite',
252+
'forcePathStyleAddressing',
253+
'flattenFolders',
254+
'logRequest',
255+
'logResponse'
256+
],
257+
S3Upload: [
258+
'awsCredentials',
259+
'regionName',
260+
'bucketName',
261+
'sourceFolder',
262+
'globExpressions',
263+
'targetFolder',
264+
'filesAcl',
265+
'createBucket',
266+
'keyManagement',
267+
'encryptionAlgorithm',
268+
'kmsMasterKeyId',
269+
'customerKey',
270+
'flattenFolders',
271+
'contentType',
272+
'contentEncoding',
273+
'storageClass',
274+
'forcePathStyleAddressing',
275+
'cacheControl',
276+
'logRequest',
277+
'logResponse'
278+
],
279+
SecretsManagerCreateOrUpdateSecret: [
280+
'awsCredentials',
281+
'regionName',
282+
'secretNameOrId',
283+
'description',
284+
'secretValueSource',
285+
'secretValue',
286+
'secretValueType',
287+
'secretValueFile',
288+
'kmsKeyId',
289+
'autoCreateSecret',
290+
'tags',
291+
'arnOutputVariable',
292+
'versionIdOutputVariable',
293+
'logRequest',
294+
'logResponse'
295+
],
296+
SecretsManagerGetSecret: [
297+
'awsCredentials',
298+
'regionName',
299+
'secretIdOrName',
300+
'variableName',
301+
'versionId',
302+
'versionStage',
303+
'logRequest',
304+
'logResponse'
305+
],
306+
SendMessage: [
307+
'awsCredentials',
308+
'regionName',
309+
'messageTarget',
310+
'message',
311+
'topicArn',
312+
'queueUrl',
313+
'delaySeconds',
314+
'logRequest',
315+
'logResponse'
316+
],
317+
SystemsManagerGetParameter: [
318+
'awsCredentials',
319+
'regionName',
320+
'readMode',
321+
'parameterName',
322+
'parameterVersion',
323+
'parameterPath',
324+
'recursive',
325+
'singleNameTransform',
326+
'hierarchyNameTransform',
327+
'customVariableName',
328+
'replacementPattern',
329+
'replacementText',
330+
'globalMatch',
331+
'caseInsensitiveMatch',
332+
'logRequest',
333+
'logResponse'
334+
],
335+
SystemsManagerRunCommand: [
336+
'awsCredentials',
337+
'regionName',
338+
'documentName',
339+
'documentParameters',
340+
'comment',
341+
'serviceRoleARN',
342+
'instanceSelector',
343+
'instanceIds',
344+
'instanceTags',
345+
'instanceBuildVariable',
346+
'maxConcurrency',
347+
'maxErrors',
348+
'timeout',
349+
'notificationArn',
350+
'notificationEvents',
351+
'notificationType',
352+
'outputS3BucketName',
353+
'outputS3KeyPrefix',
354+
'commandIdOutputVariable',
355+
'cloudWatchOutputEnabled',
356+
'cloudWatchLogGroupName',
357+
'logRequest',
358+
'logResponse'
359+
],
360+
SystemsManagerSetParameter: [
361+
'awsCredentials',
362+
'regionName',
363+
'parameterName',
364+
'parameterType',
365+
'parameterValue',
366+
'encryptionKeyId',
367+
'logRequest',
368+
'logResponse'
369+
]
370+
}

0 commit comments

Comments
 (0)