@spinnaker/amazon 0.14.2 → 0.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pipeline/stages/deleteLambda/index.d.ts +1 -0
- package/dist/pipeline/stages/deployLambda/index.d.ts +1 -0
- package/dist/pipeline/stages/invokeLambda/index.d.ts +1 -0
- package/dist/pipeline/stages/routeLambda/index.d.ts +1 -0
- package/dist/pipeline/stages/updateCodeLambda/index.d.ts +1 -0
- package/package.json +4 -4
- package/src/aws.module.ts +8 -0
- package/src/function/configure/FunctionBasicInformation.tsx +1 -16
- package/src/pipeline/stages/deleteLambda/index.ts +10 -4
- package/src/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.tsx +1 -1
- package/src/pipeline/stages/deployLambda/components/AwsLambdaFunctionStageForm.tsx +1 -2
- package/src/pipeline/stages/deployLambda/index.ts +10 -3
- package/src/pipeline/stages/invokeLambda/components/InvokeLambdaOperation.tsx +1 -0
- package/src/pipeline/stages/invokeLambda/index.ts +10 -3
- package/src/pipeline/stages/routeLambda/RouteLambdaFunctionStageForm.tsx +1 -2
- package/src/pipeline/stages/routeLambda/index.ts +10 -3
- package/src/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStage.less +5 -0
- package/src/pipeline/stages/updateCodeLambda/index.ts +10 -3
- package/src/serverGroup/details/scalingPolicy/upsert/step/StepPolicyAction.tsx +2 -0
- package/src/serverGroup/serverGroup.transformer.spec.ts +11 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spinnaker/amazon",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "0.14.
|
|
4
|
+
"version": "0.14.4",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"publishConfig": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lib": "npm run build"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@spinnaker/core": "^0.
|
|
19
|
+
"@spinnaker/core": "^0.29.0",
|
|
20
20
|
"@uirouter/angularjs": "1.0.26",
|
|
21
21
|
"@uirouter/core": "6.0.8",
|
|
22
22
|
"@uirouter/react": "1.0.7",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@spinnaker/eslint-plugin": "^3.0.2",
|
|
46
46
|
"@spinnaker/mocks": "1.0.7",
|
|
47
|
-
"@spinnaker/scripts": "^0.
|
|
47
|
+
"@spinnaker/scripts": "^0.4.0",
|
|
48
48
|
"@types/angular": "1.6.26",
|
|
49
49
|
"@types/angular-ui-bootstrap": "0.13.41",
|
|
50
50
|
"@types/classnames": "2.2.0",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"shx": "0.3.3",
|
|
59
59
|
"typescript": "4.3.5"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "082a084908e13888d640e88a5bd6e1571479de14"
|
|
62
62
|
}
|
package/src/aws.module.ts
CHANGED
|
@@ -26,22 +26,26 @@ import { AWS_LOAD_BALANCER_MODULE } from './loadBalancer/loadBalancer.module';
|
|
|
26
26
|
import amazonLogo from './logo/amazon.logo.svg';
|
|
27
27
|
import { AMAZON_PIPELINE_STAGES_BAKE_AWSBAKESTAGE } from './pipeline/stages/bake/awsBakeStage';
|
|
28
28
|
import { AMAZON_PIPELINE_STAGES_CLONESERVERGROUP_AWSCLONESERVERGROUPSTAGE } from './pipeline/stages/cloneServerGroup/awsCloneServerGroupStage';
|
|
29
|
+
import { AMAZON_PIPELINE_STAGES_LAMBDA_DELETE } from './pipeline/stages/deleteLambda';
|
|
29
30
|
import { CLOUD_FORMATION_CHANGE_SET_INFO } from './pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo';
|
|
30
31
|
import { CLOUDFORMATION_TEMPLATE_ENTRY } from './pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component';
|
|
31
32
|
import { DEPLOY_CLOUDFORMATION_STACK_STAGE } from './pipeline/stages/deployCloudFormation/deployCloudFormationStackStage';
|
|
32
33
|
import { AWS_EVALUATE_CLOUD_FORMATION_CHANGE_SET_EXECUTION_SERVICE } from './pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service';
|
|
34
|
+
import { AMAZON_PIPELINE_STAGES_LAMBDA_DEPLOY } from './pipeline/stages/deployLambda';
|
|
33
35
|
import { AMAZON_PIPELINE_STAGES_DESTROYASG_AWSDESTROYASGSTAGE } from './pipeline/stages/destroyAsg/awsDestroyAsgStage';
|
|
34
36
|
import { AMAZON_PIPELINE_STAGES_DISABLEASG_AWSDISABLEASGSTAGE } from './pipeline/stages/disableAsg/awsDisableAsgStage';
|
|
35
37
|
import { AMAZON_PIPELINE_STAGES_DISABLECLUSTER_AWSDISABLECLUSTERSTAGE } from './pipeline/stages/disableCluster/awsDisableClusterStage';
|
|
36
38
|
import { AMAZON_PIPELINE_STAGES_ENABLEASG_AWSENABLEASGSTAGE } from './pipeline/stages/enableAsg/awsEnableAsgStage';
|
|
37
39
|
import { AMAZON_PIPELINE_STAGES_FINDAMI_AWSFINDAMISTAGE } from './pipeline/stages/findAmi/awsFindAmiStage';
|
|
38
40
|
import { AMAZON_PIPELINE_STAGES_FINDIMAGEFROMTAGS_AWSFINDIMAGEFROMTAGSSTAGE } from './pipeline/stages/findImageFromTags/awsFindImageFromTagsStage';
|
|
41
|
+
import { AMAZON_PIPELINE_STAGES_LAMBDA_INVOKE } from './pipeline/stages/invokeLambda';
|
|
39
42
|
import { AMAZON_PIPELINE_STAGES_MODIFYSCALINGPROCESS_MODIFYSCALINGPROCESSSTAGE } from './pipeline/stages/modifyScalingProcess/modifyScalingProcessStage';
|
|
40
43
|
import { AMAZON_PIPELINE_STAGES_RESIZEASG_AWSRESIZEASGSTAGE } from './pipeline/stages/resizeAsg/awsResizeAsgStage';
|
|
41
44
|
import { AMAZON_PIPELINE_STAGES_ROLLBACKCLUSTER_AWSROLLBACKCLUSTERSTAGE } from './pipeline/stages/rollbackCluster/awsRollbackClusterStage';
|
|
42
45
|
import { AMAZON_PIPELINE_STAGES_SCALEDOWNCLUSTER_AWSSCALEDOWNCLUSTERSTAGE } from './pipeline/stages/scaleDownCluster/awsScaleDownClusterStage';
|
|
43
46
|
import { AMAZON_PIPELINE_STAGES_SHRINKCLUSTER_AWSSHRINKCLUSTERSTAGE } from './pipeline/stages/shrinkCluster/awsShrinkClusterStage';
|
|
44
47
|
import { AMAZON_PIPELINE_STAGES_TAGIMAGE_AWSTAGIMAGESTAGE } from './pipeline/stages/tagImage/awsTagImageStage';
|
|
48
|
+
import { AMAZON_PIPELINE_STAGES_LAMBDA_UPDATE } from './pipeline/stages/updateCodeLambda';
|
|
45
49
|
import { AWS_REACT_MODULE } from './reactShims/aws.react.module';
|
|
46
50
|
import { AMAZON_SEARCH_SEARCHRESULTFORMATTER } from './search/searchResultFormatter';
|
|
47
51
|
import { AWS_SECURITY_GROUP_MODULE } from './securityGroup/securityGroup.module';
|
|
@@ -114,6 +118,10 @@ module(AMAZON_MODULE, [
|
|
|
114
118
|
INSTANCE_SECURITY_GROUPS_COMPONENT,
|
|
115
119
|
INSTANCE_DNS_COMPONENT,
|
|
116
120
|
AMAZON_INSTANCE_INFORMATION_COMPONENT,
|
|
121
|
+
AMAZON_PIPELINE_STAGES_LAMBDA_DELETE,
|
|
122
|
+
AMAZON_PIPELINE_STAGES_LAMBDA_DEPLOY,
|
|
123
|
+
AMAZON_PIPELINE_STAGES_LAMBDA_INVOKE,
|
|
124
|
+
AMAZON_PIPELINE_STAGES_LAMBDA_UPDATE,
|
|
117
125
|
]).config(() => {
|
|
118
126
|
CloudProviderRegistry.registerProvider('aws', {
|
|
119
127
|
name: 'Amazon',
|
|
@@ -19,22 +19,7 @@ import { s3BucketNameValidator } from '../../aws.validators';
|
|
|
19
19
|
import type { IAmazonFunction } from '../../domain';
|
|
20
20
|
import type { IAmazonFunctionUpsertCommand } from '../../index';
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
'nodejs10.x',
|
|
24
|
-
'nodejs12.x',
|
|
25
|
-
'java8',
|
|
26
|
-
'java11',
|
|
27
|
-
'python2.7',
|
|
28
|
-
'python3.6',
|
|
29
|
-
'python3.7',
|
|
30
|
-
'python3.8',
|
|
31
|
-
'dotnetcore2.1',
|
|
32
|
-
'dotnetcore3.1',
|
|
33
|
-
'go1.x',
|
|
34
|
-
'ruby2.5',
|
|
35
|
-
'ruby2.7',
|
|
36
|
-
'provided',
|
|
37
|
-
];
|
|
22
|
+
import { availableRuntimes } from '../../pipeline/stages/deployLambda/components/function.constants';
|
|
38
23
|
|
|
39
24
|
export interface IFunctionProps {
|
|
40
25
|
app: Application;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import { module } from 'angular';
|
|
5
|
+
|
|
4
6
|
import { Registry, SETTINGS } from '@spinnaker/core';
|
|
5
|
-
import { lambdaDeleteStage } from './LambdaDeleteStage';
|
|
6
7
|
|
|
8
|
+
import { lambdaDeleteStage } from './LambdaDeleteStage';
|
|
7
9
|
export * from './LambdaDeleteStage';
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
export const AMAZON_PIPELINE_STAGES_LAMBDA_DELETE = 'spinnaker.amazon.pipeline.stage.Aws.LambdaDeleteStage';
|
|
12
|
+
|
|
13
|
+
module(AMAZON_PIPELINE_STAGES_LAMBDA_DELETE, []).config(function () {
|
|
14
|
+
if (SETTINGS.feature.lambdaAdditionalStages) {
|
|
15
|
+
Registry.pipeline.registerStage(lambdaDeleteStage);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
@@ -13,7 +13,7 @@ export interface ICloudFormationChangeSetInfoProps {
|
|
|
13
13
|
export const CloudFormationChangeSetInfo = (props: ICloudFormationChangeSetInfoProps) => {
|
|
14
14
|
const { stage, stageconfig } = props;
|
|
15
15
|
const [changeSetName, setChangeSetName] = useState(
|
|
16
|
-
(stage as any).changeSetName ? (stage as any).changeSetName : "ChangeSet-${
|
|
16
|
+
(stage as any).changeSetName ? (stage as any).changeSetName : "ChangeSet-${execution['id']}",
|
|
17
17
|
);
|
|
18
18
|
const [executeChangeSet, setExecuteChangeSet] = useState((stage as any).executeChangeSet);
|
|
19
19
|
const [actionOnReplacement, setActionOnReplacement] = useState((stage as any).actionOnReplacement);
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
TetheredCreatable,
|
|
16
16
|
TextInput,
|
|
17
17
|
} from '@spinnaker/core';
|
|
18
|
-
import { NumberConcurrencyInput } from '@spinnaker/core/dist/presentation/forms/inputs/NumberConcurrencyInput';
|
|
19
18
|
|
|
20
19
|
import { BasicSettingsForm, ExecutionRoleForm, LambdaAtEdgeForm, NetworkForm, TriggerEventsForm } from './index';
|
|
21
20
|
|
|
@@ -96,7 +95,7 @@ export function AwsLambdaFunctionStageForm(props: IFormikStageConfigInjectedProp
|
|
|
96
95
|
help={
|
|
97
96
|
<HelpField content="The total number of current executions of your Lambda function that can be instantiated at any time." />
|
|
98
97
|
}
|
|
99
|
-
input={(props) => <
|
|
98
|
+
input={(props) => <NumberInput {...props} min={0} max={3000} />}
|
|
100
99
|
/>
|
|
101
100
|
<FormikFormField
|
|
102
101
|
name="memorySize"
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import { module } from 'angular';
|
|
5
|
+
|
|
4
6
|
import { Registry, SETTINGS } from '@spinnaker/core';
|
|
7
|
+
|
|
5
8
|
import { lambdaDeploymentStage } from './config/LambdaDeploymentStage';
|
|
6
9
|
|
|
7
10
|
export * from './config/LambdaDeploymentStage';
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
export const AMAZON_PIPELINE_STAGES_LAMBDA_DEPLOY = 'spinnaker.amazon.pipeline.stage.Aws.LambdaDeploymentStage';
|
|
13
|
+
|
|
14
|
+
module(AMAZON_PIPELINE_STAGES_LAMBDA_DEPLOY, []).config(function () {
|
|
15
|
+
if (SETTINGS.feature.lambdaAdditionalStages) {
|
|
16
|
+
Registry.pipeline.registerStage(lambdaDeploymentStage);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -19,6 +19,7 @@ export function InvokeLambdaOperation(props: IFormikStageConfigInjectedProps) {
|
|
|
19
19
|
ArtifactTypePatterns.BITBUCKET_FILE,
|
|
20
20
|
ArtifactTypePatterns.CUSTOM_OBJECT,
|
|
21
21
|
ArtifactTypePatterns.EMBEDDED_BASE64,
|
|
22
|
+
ArtifactTypePatterns.REMOTE_BASE64,
|
|
22
23
|
ArtifactTypePatterns.GCS_OBJECT,
|
|
23
24
|
ArtifactTypePatterns.GITHUB_FILE,
|
|
24
25
|
ArtifactTypePatterns.GITLAB_FILE,
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import { module } from 'angular';
|
|
5
|
+
|
|
4
6
|
import { Registry, SETTINGS } from '@spinnaker/core';
|
|
7
|
+
|
|
5
8
|
import { lambdaInvokeStage } from './LambdaInvokeStage';
|
|
6
9
|
|
|
7
10
|
export * from './LambdaInvokeStage';
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
export const AMAZON_PIPELINE_STAGES_LAMBDA_INVOKE = 'spinnaker.amazon.pipeline.stage.Aws.LambdaInvokeStage';
|
|
13
|
+
|
|
14
|
+
module(AMAZON_PIPELINE_STAGES_LAMBDA_INVOKE, []).config(function () {
|
|
15
|
+
if (SETTINGS.feature.lambdaAdditionalStages) {
|
|
16
|
+
Registry.pipeline.registerStage(lambdaInvokeStage);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
TextInput,
|
|
20
20
|
useData,
|
|
21
21
|
} from '@spinnaker/core';
|
|
22
|
-
import { NumberConcurrencyInput } from '@spinnaker/core/dist/presentation/forms/inputs/NumberConcurrencyInput';
|
|
23
22
|
|
|
24
23
|
import { TriggerEventsForm } from './TriggerEventsForm';
|
|
25
24
|
import { DeploymentStrategyForm } from './components';
|
|
@@ -123,7 +122,7 @@ export function RouteLambdaFunctionStageForm(props: IFormikStageConfigInjectedPr
|
|
|
123
122
|
values.deploymentStrategy === '$WEIGHTED' ? (
|
|
124
123
|
<NumberInput {...props} min={0} max={0} />
|
|
125
124
|
) : (
|
|
126
|
-
<
|
|
125
|
+
<NumberInput {...props} min={0} max={3000} />
|
|
127
126
|
)
|
|
128
127
|
}
|
|
129
128
|
required={false}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import { module } from 'angular';
|
|
5
|
+
|
|
4
6
|
import { Registry, SETTINGS } from '@spinnaker/core';
|
|
7
|
+
|
|
5
8
|
import { lambdaRouteStage } from './LambdaRouteStage';
|
|
6
9
|
|
|
7
10
|
export * from './LambdaRouteStage';
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
export const AMAZON_PIPELINE_STAGES_LAMBDA_ROUTE = 'spinnaker.amazon.pipeline.stage.Aws.LambdaTrafficRoutingStage';
|
|
13
|
+
|
|
14
|
+
module(AMAZON_PIPELINE_STAGES_LAMBDA_ROUTE, []).config(function () {
|
|
15
|
+
if (SETTINGS.feature.lambdaAdditionalStages) {
|
|
16
|
+
Registry.pipeline.registerStage(lambdaRouteStage);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import { module } from 'angular';
|
|
5
|
+
|
|
4
6
|
import { Registry, SETTINGS } from '@spinnaker/core';
|
|
7
|
+
|
|
5
8
|
import { lambdaUpdateCodeStage } from './LambdaUpdateCodeStage';
|
|
6
9
|
|
|
7
10
|
export * from './LambdaUpdateCodeStage';
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
export const AMAZON_PIPELINE_STAGES_LAMBDA_UPDATE = 'spinnaker.amazon.pipeline.stage.Aws.LambdaUpdateCodeStage';
|
|
13
|
+
|
|
14
|
+
module(AMAZON_PIPELINE_STAGES_LAMBDA_UPDATE, []).config(function () {
|
|
15
|
+
if (SETTINGS.feature.lambdaAdditionalStages) {
|
|
16
|
+
Registry.pipeline.registerStage(lambdaUpdateCodeStage);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -106,6 +106,7 @@ export const StepPolicyAction = ({
|
|
|
106
106
|
<NumberInput
|
|
107
107
|
value={step.metricIntervalLowerBound}
|
|
108
108
|
max={step.metricIntervalUpperBound}
|
|
109
|
+
step={0.1}
|
|
109
110
|
onChange={(e) =>
|
|
110
111
|
updateStep({ ...step, metricIntervalLowerBound: Number.parseFloat(e.target.value) }, index)
|
|
111
112
|
}
|
|
@@ -121,6 +122,7 @@ export const StepPolicyAction = ({
|
|
|
121
122
|
<NumberInput
|
|
122
123
|
value={step.metricIntervalUpperBound}
|
|
123
124
|
min={step.metricIntervalLowerBound}
|
|
125
|
+
step={0.1}
|
|
124
126
|
onChange={(e) =>
|
|
125
127
|
updateStep({ ...step, metricIntervalUpperBound: Number.parseFloat(e.target.value) }, index)
|
|
126
128
|
}
|
|
@@ -169,6 +169,17 @@ describe('awsServerGroupTransformer', () => {
|
|
|
169
169
|
[0, 10, -5],
|
|
170
170
|
);
|
|
171
171
|
});
|
|
172
|
+
|
|
173
|
+
it('verify float adjustments work within the range', function () {
|
|
174
|
+
this.test(
|
|
175
|
+
[
|
|
176
|
+
{ id: 1, scalingAdjustment: 10, metricIntervalLowerBound: 3.5, metricIntervalUpperBound: 5.5 },
|
|
177
|
+
{ id: 2, scalingAdjustment: 0, metricIntervalLowerBound: 5.5 },
|
|
178
|
+
{ id: 3, scalingAdjustment: -5, metricIntervalLowerBound: 1.2, metricIntervalUpperBound: 3.5 },
|
|
179
|
+
],
|
|
180
|
+
[-5, 10, 0],
|
|
181
|
+
);
|
|
182
|
+
});
|
|
172
183
|
});
|
|
173
184
|
});
|
|
174
185
|
});
|