@spinnaker/amazon 2026.2.2 → 2026.3.0
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/dist/aws.module.d.ts +2 -1
- package/dist/aws.services.d.ts +8 -0
- package/dist/certificates/AmazonCertificateReader.d.ts +1 -1
- package/dist/domain/IAmazonServerGroup.d.ts +10 -0
- package/dist/function/CreateLambdaFunction.d.ts +10 -5
- package/dist/function/configure/Network.d.ts +3 -0
- package/dist/function/details/FunctionActions.d.ts +3 -0
- package/dist/function/function.transformer.d.ts +1 -0
- package/dist/image/image.reader.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/instance/amazon.instance.write.service.d.ts +5 -5
- package/dist/instance/awsInstanceType.service.d.ts +13 -2
- package/dist/instance/details/AmazonInstanceDetails.d.ts +67 -0
- package/dist/instance/index.d.ts +1 -0
- package/dist/keyPairs/KeyPairsReader.d.ts +1 -1
- package/dist/loadBalancer/AmazonLoadBalancersTag.d.ts +7 -4
- package/dist/loadBalancer/OidcConfigReader.d.ts +1 -1
- package/dist/loadBalancer/TargetGroupDetails.d.ts +37 -3
- package/dist/loadBalancer/amazonLoadBalancerDataUtils.d.ts +1 -1
- package/dist/loadBalancer/configure/AmazonLoadBalancerChoiceModal.d.ts +6 -2
- package/dist/loadBalancer/configure/LoadBalancerTypes.d.ts +4 -4
- package/dist/loadBalancer/configure/application/CreateApplicationLoadBalancer.d.ts +10 -5
- package/dist/loadBalancer/configure/classic/CreateClassicLoadBalancer.d.ts +12 -7
- package/dist/loadBalancer/configure/common/SecurityGroups.d.ts +4 -0
- package/dist/loadBalancer/configure/network/CreateNetworkLoadBalancer.d.ts +10 -5
- package/dist/loadBalancer/details/LoadBalancerActions.d.ts +9 -2
- package/dist/loadBalancer/details/amazonLoadBalancerDetails.d.ts +22 -0
- package/dist/loadBalancer/index.d.ts +1 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +1 -1
- package/dist/pipeline/stages/AmazonStageConfig.d.ts +11 -0
- package/dist/pipeline/stages/bake/AwsBakeStageConfig.d.ts +66 -0
- package/dist/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.d.ts +20 -0
- package/dist/pipeline/stages/deleteLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.d.ts +5 -4
- package/dist/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.d.ts +1 -3
- package/dist/pipeline/stages/deployLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/destroyAsg/awsDestroyAsgStage.d.ts +26 -2
- package/dist/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.d.ts +27 -0
- package/dist/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.d.ts +20 -0
- package/dist/pipeline/stages/findAmi/awsFindAmiStage.d.ts +17 -2
- package/dist/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.d.ts +12 -2
- package/dist/pipeline/stages/invokeLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.d.ts +20 -2
- package/dist/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.d.ts +20 -0
- package/dist/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.d.ts +17 -0
- package/dist/pipeline/stages/resizeAsg/awsResizeAsgStage.d.ts +40 -2
- package/dist/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/routeLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.d.ts +22 -0
- package/dist/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.d.ts +21 -0
- package/dist/pipeline/stages/tagImage/awsTagImageStage.d.ts +5 -2
- package/dist/pipeline/stages/updateCodeLambda/index.d.ts +1 -1
- package/dist/search/searchResultFormatter.d.ts +4 -2
- package/dist/securityGroup/configure/AmazonSecurityGroupModal.d.ts +43 -0
- package/dist/securityGroup/details/AmazonSecurityGroupDetails.d.ts +62 -0
- package/dist/securityGroup/details/index.d.ts +1 -0
- package/dist/securityGroup/index.d.ts +1 -0
- package/dist/securityGroup/securityGroup.reader.d.ts +0 -1
- package/dist/securityGroup/securityGroup.transformer.d.ts +11 -2
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +23 -7
- package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +17 -13
- package/dist/serverGroup/configure/wizard/AmazonCloneServerGroupModal.d.ts +16 -6
- package/dist/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.d.ts +6 -3
- package/dist/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.d.ts +3 -0
- package/dist/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.d.ts +4 -0
- package/dist/serverGroup/details/AmazonServerGroupActions.d.ts +10 -2
- package/dist/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.d.ts +17 -0
- package/dist/serverGroup/details/advancedSettings/index.d.ts +1 -0
- package/dist/serverGroup/details/resize/AmazonResizeServerGroupModal.d.ts +5 -3
- package/dist/serverGroup/details/rollback/AmazonRollbackServerGroupModal.d.ts +67 -0
- package/dist/serverGroup/details/rollback/index.d.ts +2 -0
- package/dist/serverGroup/details/rollback/rollbackServerGroupSelection.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/ScalingPolicyWriter.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.d.ts +0 -1
- package/dist/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.d.ts +24 -0
- package/dist/serverGroup/details/scalingProcesses/index.d.ts +2 -0
- package/dist/serverGroup/details/scheduledActions/EditScheduledActionsModal.d.ts +31 -0
- package/dist/serverGroup/details/scheduledActions/index.d.ts +1 -0
- package/dist/serverGroup/details/sections/AdvancedSettingsDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/AmazonCapacityDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/ScalingProcessesDetailsSection.d.ts +1 -1
- package/dist/serverGroup/details/sections/ScheduledActionsDetailsSection.d.ts +1 -1
- package/dist/serverGroup/details/sections/SecurityGroupsDetailsSection.d.ts +4 -1
- package/dist/serverGroup/details/sections/WarmPoolDetailsSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/index.d.ts +1 -0
- package/dist/serverGroup/details/securityGroups/EditSecurityGroupsModal.d.ts +32 -0
- package/dist/serverGroup/details/securityGroups/index.d.ts +1 -0
- package/dist/serverGroup/details/warmPool/ModifyWarmPoolModal.d.ts +26 -0
- package/dist/serverGroup/details/warmPool/WarmPoolService.d.ts +6 -0
- package/dist/serverGroup/details/warmPool/index.d.ts +2 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +1 -2
- package/dist/vpc/VpcReader.d.ts +2 -2
- package/dist/vpc/index.d.ts +1 -0
- package/package.json +3 -12
- package/src/aws.module.spec.ts +296 -0
- package/src/aws.module.ts +107 -112
- package/src/aws.services.ts +21 -0
- package/src/certificates/AmazonCertificateReader.ts +1 -1
- package/src/domain/IAmazonServerGroup.ts +9 -0
- package/src/function/CreateLambdaFunction.tsx +29 -16
- package/src/function/configure/Network.tsx +8 -4
- package/src/function/details/AmazonFunctionDetails.tsx +4 -5
- package/src/function/details/FunctionActions.tsx +5 -1
- package/src/function/function.transformer.ts +4 -0
- package/src/image/image.reader.ts +3 -5
- package/src/index.ts +2 -2
- package/src/instance/amazon.instance.write.service.ts +15 -4
- package/src/instance/awsInstanceType.service.spec.js +172 -136
- package/src/instance/awsInstanceType.service.ts +142 -154
- package/src/instance/details/AmazonInstanceDetails.spec.tsx +79 -0
- package/src/instance/details/AmazonInstanceDetails.tsx +644 -0
- package/src/instance/details/InstanceInformation.tsx +11 -14
- package/src/instance/details/InstanceSecurityGroups.tsx +20 -23
- package/src/instance/details/InstanceTags.tsx +5 -3
- package/src/instance/index.ts +1 -0
- package/src/keyPairs/KeyPairsReader.ts +1 -1
- package/src/loadBalancer/AmazonLoadBalancersTag.spec.tsx +39 -0
- package/src/loadBalancer/AmazonLoadBalancersTag.tsx +21 -14
- package/src/loadBalancer/OidcConfigReader.ts +1 -1
- package/src/loadBalancer/TargetGroupDetails.spec.tsx +113 -0
- package/src/loadBalancer/TargetGroupDetails.tsx +287 -7
- package/src/loadBalancer/amazonLoadBalancerDataUtils.ts +21 -21
- package/src/loadBalancer/configure/AmazonLoadBalancerChoiceModal.tsx +17 -4
- package/src/loadBalancer/configure/LoadBalancerTypes.ts +7 -4
- package/src/loadBalancer/configure/application/ALBListeners.tsx +1 -2
- package/src/loadBalancer/configure/application/CreateApplicationLoadBalancer.tsx +28 -18
- package/src/loadBalancer/configure/classic/CreateClassicLoadBalancer.tsx +29 -19
- package/src/loadBalancer/configure/common/LoadBalancerLocation.tsx +1 -1
- package/src/loadBalancer/configure/common/SecurityGroups.spec.tsx +27 -0
- package/src/loadBalancer/configure/common/SecurityGroups.tsx +11 -5
- package/src/loadBalancer/configure/network/CreateNetworkLoadBalancer.tsx +28 -18
- package/src/loadBalancer/details/LoadBalancerActions.tsx +19 -5
- package/src/loadBalancer/details/amazonLoadBalancerDetails.spec.tsx +141 -0
- package/src/loadBalancer/details/amazonLoadBalancerDetails.tsx +599 -0
- package/src/loadBalancer/index.ts +1 -0
- package/src/loadBalancer/loadBalancer.transformer.ts +3 -4
- package/src/pipeline/stages/AmazonStageConfig.spec.tsx +103 -0
- package/src/pipeline/stages/AmazonStageConfig.tsx +259 -0
- package/src/pipeline/stages/bake/AwsBakeStageConfig.tsx +708 -0
- package/src/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.tsx +275 -0
- package/src/pipeline/stages/deleteLambda/index.ts +2 -6
- package/src/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.tsx +14 -33
- package/src/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.tsx +264 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.spec.tsx +403 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.ts +21 -29
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.ts +1 -11
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionApproval.tsx +4 -3
- package/src/pipeline/stages/deployLambda/components/NetworkForm.tsx +3 -6
- package/src/pipeline/stages/deployLambda/index.ts +2 -6
- package/src/pipeline/stages/destroyAsg/awsDestroyAsgStage.js +28 -65
- package/src/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.tsx +103 -0
- package/src/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.tsx +119 -0
- package/src/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.tsx +98 -0
- package/src/pipeline/stages/findAmi/awsFindAmiStage.js +22 -79
- package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.spec.tsx +122 -0
- package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.tsx +71 -0
- package/src/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.js +17 -32
- package/src/pipeline/stages/invokeLambda/index.ts +2 -6
- package/src/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.tsx +146 -0
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.js +27 -98
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.spec.tsx +167 -0
- package/src/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.tsx +157 -0
- package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.js +26 -0
- package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.spec.tsx +89 -0
- package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.spec.tsx +617 -0
- package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.tsx +340 -0
- package/src/pipeline/stages/resizeAsg/awsResizeAsgStage.js +34 -125
- package/src/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.tsx +129 -0
- package/src/pipeline/stages/routeLambda/index.ts +2 -6
- package/src/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.tsx +121 -0
- package/src/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.tsx +136 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.spec.tsx +167 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.tsx +94 -0
- package/src/pipeline/stages/updateCodeLambda/index.ts +2 -6
- package/src/routerConsumers.spec.tsx +207 -0
- package/src/search/searchResultFormatter.ts +9 -16
- package/src/securityGroup/configure/AmazonSecurityGroupModal.spec.tsx +170 -0
- package/src/securityGroup/configure/AmazonSecurityGroupModal.tsx +440 -0
- package/src/securityGroup/details/AmazonSecurityGroupDetails.spec.tsx +62 -0
- package/src/securityGroup/details/AmazonSecurityGroupDetails.tsx +444 -0
- package/src/securityGroup/details/IPRangeRules.tsx +1 -1
- package/src/securityGroup/details/index.ts +1 -0
- package/src/securityGroup/index.ts +1 -0
- package/src/securityGroup/securityGroup.reader.ts +0 -5
- package/src/securityGroup/securityGroup.transformer.ts +35 -0
- package/src/serverGroup/configure/AmazonImageSelectInput.spec.tsx +104 -80
- package/src/serverGroup/configure/AmazonImageSelectInput.tsx +37 -18
- package/src/serverGroup/configure/serverGroupCommandBuilder.aws.service.spec.js +28 -66
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +476 -465
- package/src/serverGroup/configure/serverGroupCommandBuilder.spec.js +76 -124
- package/src/serverGroup/configure/serverGroupConfiguration.service.ts +106 -103
- package/src/serverGroup/configure/wizard/AmazonCloneServerGroupModal.tsx +65 -25
- package/src/serverGroup/configure/wizard/instanceType/CpuCreditsToggle.tsx +3 -3
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/AdvancedModeSelector.tsx +2 -2
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.spec.tsx +105 -0
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.tsx +20 -6
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.spec.tsx +39 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +10 -9
- package/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx +2 -2
- package/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx +5 -2
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.spec.tsx +53 -0
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.tsx +35 -33
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.spec.tsx +20 -0
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.tsx +9 -4
- package/src/serverGroup/details/AmazonServerGroupActions.spec.tsx +186 -0
- package/src/serverGroup/details/AmazonServerGroupActions.tsx +37 -87
- package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.spec.tsx +110 -0
- package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.tsx +117 -0
- package/src/serverGroup/details/advancedSettings/index.ts +1 -0
- package/src/serverGroup/details/amazonServerGroupDetailsGetter.ts +4 -4
- package/src/serverGroup/details/resize/AmazonResizeServerGroupModal.tsx +16 -6
- package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.spec.tsx +285 -0
- package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.tsx +449 -0
- package/src/serverGroup/details/rollback/index.ts +2 -0
- package/src/serverGroup/details/rollback/rollbackServerGroupSelection.spec.ts +101 -0
- package/src/serverGroup/details/rollback/rollbackServerGroupSelection.ts +81 -0
- package/src/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.tsx +4 -4
- package/src/serverGroup/details/scalingPolicy/ScalingPolicyWriter.ts +2 -5
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.tsx +0 -2
- package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.spec.tsx +74 -0
- package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.tsx +140 -0
- package/src/serverGroup/details/scalingProcesses/index.ts +2 -0
- package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.spec.tsx +115 -0
- package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.tsx +205 -0
- package/src/serverGroup/details/scheduledActions/index.ts +1 -0
- package/src/serverGroup/details/sections/AdvancedSettingsDetailsSection.tsx +7 -14
- package/src/serverGroup/details/sections/AmazonCapacityDetailsSection.tsx +14 -2
- package/src/serverGroup/details/sections/AmazonServerGroupMaintenanceActions.spec.tsx +148 -0
- package/src/serverGroup/details/sections/InstancesDistributionDetailsSection.spec.tsx +1 -5
- package/src/serverGroup/details/sections/LaunchTemplateDetailsSection.spec.tsx +1 -5
- package/src/serverGroup/details/sections/ScalingProcessesDetailsSection.tsx +8 -20
- package/src/serverGroup/details/sections/ScheduledActionsDetailsSection.tsx +7 -12
- package/src/serverGroup/details/sections/SecurityGroupsDetailsSection.tsx +14 -19
- package/src/serverGroup/details/sections/WarmPoolDetailsSection.tsx +44 -0
- package/src/serverGroup/details/sections/index.ts +1 -0
- package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.spec.tsx +161 -0
- package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.tsx +177 -0
- package/src/serverGroup/details/securityGroups/index.ts +1 -0
- package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.spec.tsx +69 -0
- package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.tsx +191 -0
- package/src/serverGroup/details/warmPool/WarmPoolService.spec.ts +30 -0
- package/src/serverGroup/details/warmPool/WarmPoolService.ts +15 -0
- package/src/serverGroup/details/warmPool/index.ts +2 -0
- package/src/serverGroup/serverGroup.transformer.ts +1 -6
- package/src/vpc/VpcReader.ts +2 -2
- package/src/vpc/index.ts +1 -0
- package/dist/common/common.module.d.ts +0 -1
- package/dist/common/footer.component.d.ts +0 -1
- package/dist/function/function.module.d.ts +0 -1
- package/dist/instance/details/amazonInstanceInformation.component.d.ts +0 -1
- package/dist/instance/details/instance.details.controller.d.ts +0 -2
- package/dist/instance/details/instanceDns.component.d.ts +0 -1
- package/dist/instance/details/instanceSecurityGroups.component.d.ts +0 -1
- package/dist/instance/details/instanceStatus.component.d.ts +0 -1
- package/dist/instance/details/instanceTags.component.d.ts +0 -1
- package/dist/loadBalancer/details/loadBalancerActions.component.d.ts +0 -1
- package/dist/loadBalancer/details/loadBalancerDetails.controller.d.ts +0 -41
- package/dist/loadBalancer/details/targetGroupDetails.controller.d.ts +0 -30
- package/dist/loadBalancer/loadBalancer.module.d.ts +0 -1
- package/dist/loadBalancer/targetGroup.states.d.ts +0 -1
- package/dist/pipeline/stages/bake/awsBakeStage.d.ts +0 -2
- package/dist/pipeline/stages/bake/bakeExecutionDetails.controller.d.ts +0 -2
- package/dist/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.d.ts +0 -2
- package/dist/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.d.ts +0 -1
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.d.ts +0 -25
- package/dist/pipeline/stages/disableAsg/awsDisableAsgStage.d.ts +0 -2
- package/dist/pipeline/stages/disableCluster/awsDisableClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/enableAsg/awsEnableAsgStage.d.ts +0 -2
- package/dist/pipeline/stages/rollbackCluster/awsRollbackClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/shrinkCluster/awsShrinkClusterStage.d.ts +0 -2
- package/dist/reactShims/aws.react.injector.d.ts +0 -18
- package/dist/reactShims/aws.react.module.d.ts +0 -1
- package/dist/reactShims/index.d.ts +0 -1
- package/dist/securityGroup/clone/cloneSecurityGroup.controller.d.ts +0 -2
- package/dist/securityGroup/configure/CreateSecurityGroupCtrl.d.ts +0 -2
- package/dist/securityGroup/configure/EditSecurityGroupCtrl.d.ts +0 -2
- package/dist/securityGroup/configure/configSecurityGroup.mixin.controller.d.ts +0 -2
- package/dist/securityGroup/configure/ingressRuleGroupSelector.component.d.ts +0 -1
- package/dist/securityGroup/configure/securityGroupDetailsCustom.component.d.ts +0 -1
- package/dist/securityGroup/configure/securityGroupDetailsCustom.d.ts +0 -10
- package/dist/securityGroup/details/securityGroupDetail.controller.d.ts +0 -2
- package/dist/securityGroup/details/securityGroupIpRangeRules.component.d.ts +0 -1
- package/dist/securityGroup/securityGroup.module.d.ts +0 -1
- package/dist/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +0 -2
- package/dist/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.d.ts +0 -1
- package/dist/serverGroup/details/scalingPolicy/scalingPolicy.module.d.ts +0 -1
- package/dist/serverGroup/details/scalingPolicy/scalingPolicySummary.component.d.ts +0 -1
- package/dist/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.d.ts +0 -2
- package/dist/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/serverGroupDetails.module.d.ts +0 -1
- package/dist/subnet/subnet.renderer.d.ts +0 -5
- package/dist/vpc/vpc.module.d.ts +0 -1
- package/src/applicationProviderFields/awsFields.html +0 -13
- package/src/common/common.module.ts +0 -6
- package/src/common/footer.component.ts +0 -29
- package/src/function/function.module.ts +0 -5
- package/src/image/image.reader.spec.ts +0 -75
- package/src/instance/details/amazonInstanceInformation.component.ts +0 -13
- package/src/instance/details/instance.details.controller.js +0 -586
- package/src/instance/details/instance.details.controller.spec.js +0 -133
- package/src/instance/details/instanceDetails.html +0 -65
- package/src/instance/details/instanceDns.component.ts +0 -21
- package/src/instance/details/instanceSecurityGroups.component.ts +0 -13
- package/src/instance/details/instanceStatus.component.ts +0 -19
- package/src/instance/details/instanceTags.component.ts +0 -13
- package/src/loadBalancer/details/loadBalancerActions.component.ts +0 -16
- package/src/loadBalancer/details/loadBalancerDetails.controller.spec.ts +0 -76
- package/src/loadBalancer/details/loadBalancerDetails.controller.ts +0 -240
- package/src/loadBalancer/details/loadBalancerDetails.html +0 -266
- package/src/loadBalancer/details/targetGroupDetails.controller.ts +0 -95
- package/src/loadBalancer/details/targetGroupDetails.html +0 -138
- package/src/loadBalancer/loadBalancer.module.ts +0 -15
- package/src/loadBalancer/targetGroup.states.ts +0 -55
- package/src/pipeline/stages/bake/awsBakeStage.js +0 -219
- package/src/pipeline/stages/bake/bakeExecutionDetails.controller.js +0 -43
- package/src/pipeline/stages/bake/bakeExecutionDetails.html +0 -65
- package/src/pipeline/stages/bake/bakeStage.html +0 -205
- package/src/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.js +0 -143
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStage.html +0 -143
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStepLabel.html +0 -1
- package/src/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.ts +0 -46
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.ts +0 -84
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.html +0 -84
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +0 -9
- package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +0 -1
- package/src/pipeline/stages/disableAsg/awsDisableAsgStage.js +0 -69
- package/src/pipeline/stages/disableAsg/disableAsgStage.html +0 -11
- package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +0 -1
- package/src/pipeline/stages/disableCluster/awsDisableClusterStage.js +0 -84
- package/src/pipeline/stages/disableCluster/disableClusterStage.html +0 -26
- package/src/pipeline/stages/enableAsg/awsEnableAsgStage.js +0 -73
- package/src/pipeline/stages/enableAsg/enableAsgStage.html +0 -11
- package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +0 -1
- package/src/pipeline/stages/findAmi/findAmiStage.html +0 -24
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html +0 -44
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html +0 -11
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessExecutionDetails.html +0 -36
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.html +0 -24
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +0 -90
- package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +0 -4
- package/src/pipeline/stages/rollbackCluster/awsRollbackClusterStage.js +0 -66
- package/src/pipeline/stages/rollbackCluster/rollbackClusterStage.html +0 -43
- package/src/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.js +0 -78
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +0 -35
- package/src/pipeline/stages/shrinkCluster/awsShrinkClusterStage.js +0 -73
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +0 -34
- package/src/pipeline/stages/tagImage/awsTagImageStage.js +0 -34
- package/src/pipeline/stages/tagImage/tagImageExecutionDetails.html +0 -38
- package/src/pipeline/stages/tagImage/tagImageStage.html +0 -10
- package/src/reactShims/aws.react.injector.ts +0 -25
- package/src/reactShims/aws.react.module.ts +0 -12
- package/src/reactShims/index.ts +0 -1
- package/src/securityGroup/clone/cloneSecurityGroup.controller.js +0 -106
- package/src/securityGroup/clone/cloneSecurityGroup.html +0 -19
- package/src/securityGroup/configure/CreateSecurityGroup.controller.spec.js +0 -307
- package/src/securityGroup/configure/CreateSecurityGroupCtrl.js +0 -47
- package/src/securityGroup/configure/EditSecurityGroupCtrl.js +0 -115
- package/src/securityGroup/configure/configSecurityGroup.mixin.controller.js +0 -366
- package/src/securityGroup/configure/createSecurityGroup.html +0 -19
- package/src/securityGroup/configure/createSecurityGroupIngress.html +0 -100
- package/src/securityGroup/configure/createSecurityGroupProperties.html +0 -123
- package/src/securityGroup/configure/editSecurityGroup.html +0 -20
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.html +0 -77
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.less +0 -6
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.ts +0 -190
- package/src/securityGroup/configure/securityGroupDetailsCustom.component.ts +0 -16
- package/src/securityGroup/configure/securityGroupDetailsCustom.tsx +0 -16
- package/src/securityGroup/details/securityGroupDetail.controller.js +0 -249
- package/src/securityGroup/details/securityGroupDetail.html +0 -114
- package/src/securityGroup/details/securityGroupIpRangeRules.component.ts +0 -12
- package/src/securityGroup/securityGroup.module.ts +0 -26
- package/src/securityGroup/securityGroup.transformer.js +0 -48
- package/src/serverGroup/configure/serverGroupConfiguration.service.spec.ts +0 -478
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.js +0 -47
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.html +0 -79
- package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +0 -146
- package/src/serverGroup/details/rollback/rollbackServerGroup.html +0 -139
- package/src/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.ts +0 -15
- package/src/serverGroup/details/scalingPolicy/scalingPolicy.module.ts +0 -6
- package/src/serverGroup/details/scalingPolicy/scalingPolicySummary.component.ts +0 -14
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/dimensionsEditor.less +0 -18
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.js +0 -95
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.spec.js +0 -106
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.html +0 -30
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.js +0 -70
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.html +0 -89
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.js +0 -95
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.html +0 -40
- package/src/serverGroup/details/serverGroupDetails.module.ts +0 -18
- package/src/serverGroup/serverGroup.transformer.spec.ts +0 -185
- package/src/subnet/SubnetSelectInput.spec.tsx +0 -91
- package/src/subnet/subnet.renderer.ts +0 -12
- package/src/vpc/vpc.module.ts +0 -9
|
@@ -1,18 +1,14 @@
|
|
|
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
|
-
|
|
6
4
|
import { Registry, SETTINGS } from '@spinnaker/core';
|
|
7
5
|
|
|
8
6
|
import { lambdaInvokeStage } from './LambdaInvokeStage';
|
|
9
7
|
|
|
10
8
|
export * from './LambdaInvokeStage';
|
|
11
9
|
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
module(AMAZON_PIPELINE_STAGES_LAMBDA_INVOKE, []).config(function () {
|
|
10
|
+
export function registerLambdaInvokeStage(): void {
|
|
15
11
|
if (SETTINGS.feature.lambdaAdditionalStages) {
|
|
16
12
|
Registry.pipeline.registerStage(lambdaInvokeStage);
|
|
17
13
|
}
|
|
18
|
-
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { IAccount, IStageConfigProps } from '@spinnaker/core';
|
|
4
|
+
import {
|
|
5
|
+
AccountRegionClusterSelector,
|
|
6
|
+
AccountService,
|
|
7
|
+
ChecklistInput,
|
|
8
|
+
StageConfigField,
|
|
9
|
+
StageConstants,
|
|
10
|
+
} from '@spinnaker/core';
|
|
11
|
+
|
|
12
|
+
const ACTIONS = [
|
|
13
|
+
{ label: 'Suspend', value: 'suspend' },
|
|
14
|
+
{ label: 'Resume', value: 'resume' },
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
const SCALING_PROCESSES = [
|
|
18
|
+
'Launch',
|
|
19
|
+
'Terminate',
|
|
20
|
+
'AddToLoadBalancer',
|
|
21
|
+
'AlarmNotification',
|
|
22
|
+
'AZRebalance',
|
|
23
|
+
'HealthCheck',
|
|
24
|
+
'ReplaceUnhealthy',
|
|
25
|
+
'ScheduledActions',
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
export function ModifyScalingProcessStageConfig({
|
|
29
|
+
application,
|
|
30
|
+
pipeline,
|
|
31
|
+
stage,
|
|
32
|
+
updateStage,
|
|
33
|
+
updateStageField,
|
|
34
|
+
}: IStageConfigProps) {
|
|
35
|
+
const [accounts, setAccounts] = React.useState<IAccount[]>([]);
|
|
36
|
+
|
|
37
|
+
React.useEffect(() => {
|
|
38
|
+
let mounted = true;
|
|
39
|
+
AccountService.listAccounts('aws').then((loadedAccounts) => mounted && setAccounts(loadedAccounts));
|
|
40
|
+
return () => {
|
|
41
|
+
mounted = false;
|
|
42
|
+
};
|
|
43
|
+
}, []);
|
|
44
|
+
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
const defaults: Record<string, any> = {};
|
|
47
|
+
const defaultCredentials = application.defaultCredentials.aws;
|
|
48
|
+
const defaultRegion = application.defaultRegions.aws;
|
|
49
|
+
|
|
50
|
+
if (!stage.cloudProvider) {
|
|
51
|
+
defaults.cloudProvider = 'aws';
|
|
52
|
+
}
|
|
53
|
+
if (!stage.processes) {
|
|
54
|
+
defaults.processes = [];
|
|
55
|
+
}
|
|
56
|
+
if (!stage.regions) {
|
|
57
|
+
defaults.regions = defaultRegion ? [defaultRegion] : [];
|
|
58
|
+
} else if (!stage.regions.length && defaultRegion) {
|
|
59
|
+
defaults.regions = [defaultRegion];
|
|
60
|
+
}
|
|
61
|
+
if (!stage.credentials && defaultCredentials) {
|
|
62
|
+
defaults.credentials = defaultCredentials;
|
|
63
|
+
}
|
|
64
|
+
if (!stage.action) {
|
|
65
|
+
defaults.action = ACTIONS[0].value;
|
|
66
|
+
}
|
|
67
|
+
if (!stage.target) {
|
|
68
|
+
defaults.target = StageConstants.TARGET_LIST[0].val;
|
|
69
|
+
}
|
|
70
|
+
if (stage.suspendProcesses !== undefined || stage.resumeProcesses !== undefined) {
|
|
71
|
+
defaults.suspendProcesses = undefined;
|
|
72
|
+
defaults.resumeProcesses = undefined;
|
|
73
|
+
}
|
|
74
|
+
if (Object.keys(defaults).length) {
|
|
75
|
+
updateStageField(defaults);
|
|
76
|
+
}
|
|
77
|
+
}, [
|
|
78
|
+
application.defaultCredentials.aws,
|
|
79
|
+
application.defaultRegions.aws,
|
|
80
|
+
stage.action,
|
|
81
|
+
stage.cloudProvider,
|
|
82
|
+
stage.credentials,
|
|
83
|
+
stage.processes,
|
|
84
|
+
stage.regions,
|
|
85
|
+
stage.resumeProcesses,
|
|
86
|
+
stage.suspendProcesses,
|
|
87
|
+
stage.target,
|
|
88
|
+
updateStageField,
|
|
89
|
+
]);
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<div className="form-horizontal">
|
|
93
|
+
{!pipeline.strategy && (
|
|
94
|
+
<AccountRegionClusterSelector
|
|
95
|
+
accounts={accounts}
|
|
96
|
+
application={application}
|
|
97
|
+
component={{ ...stage }}
|
|
98
|
+
onComponentUpdate={updateStage}
|
|
99
|
+
/>
|
|
100
|
+
)}
|
|
101
|
+
<StageConfigField label="Target">
|
|
102
|
+
<select
|
|
103
|
+
className="form-control input-sm"
|
|
104
|
+
name="target"
|
|
105
|
+
onChange={(event) => updateStageField({ target: event.target.value })}
|
|
106
|
+
value={stage.target || StageConstants.TARGET_LIST[0].val}
|
|
107
|
+
>
|
|
108
|
+
{StageConstants.TARGET_LIST.map((target) => (
|
|
109
|
+
<option key={target.val} title={target.description} value={target.val}>
|
|
110
|
+
{target.label}
|
|
111
|
+
</option>
|
|
112
|
+
))}
|
|
113
|
+
</select>
|
|
114
|
+
</StageConfigField>
|
|
115
|
+
<StageConfigField label="Action">
|
|
116
|
+
<select
|
|
117
|
+
className="form-control input-sm"
|
|
118
|
+
name="action"
|
|
119
|
+
onChange={(event) =>
|
|
120
|
+
updateStageField({
|
|
121
|
+
action: event.target.value,
|
|
122
|
+
suspendProcesses: undefined,
|
|
123
|
+
resumeProcesses: undefined,
|
|
124
|
+
})
|
|
125
|
+
}
|
|
126
|
+
value={stage.action || ACTIONS[0].value}
|
|
127
|
+
>
|
|
128
|
+
{ACTIONS.map((action) => (
|
|
129
|
+
<option key={action.value} value={action.value}>
|
|
130
|
+
{action.label}
|
|
131
|
+
</option>
|
|
132
|
+
))}
|
|
133
|
+
</select>
|
|
134
|
+
</StageConfigField>
|
|
135
|
+
<StageConfigField label="Processes">
|
|
136
|
+
<ChecklistInput
|
|
137
|
+
name="processes"
|
|
138
|
+
onChange={(event: any) => updateStageField({ processes: event.target.value })}
|
|
139
|
+
showSelectAll={true}
|
|
140
|
+
stringOptions={SCALING_PROCESSES}
|
|
141
|
+
value={stage.processes || []}
|
|
142
|
+
/>
|
|
143
|
+
</StageConfigField>
|
|
144
|
+
</div>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
@@ -1,98 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
cloudProvider: 'aws',
|
|
29
|
-
strategy: true,
|
|
30
|
-
});
|
|
31
|
-
})
|
|
32
|
-
.controller('ModifyScalingProcessStageCtrl', [
|
|
33
|
-
'$scope',
|
|
34
|
-
'stage',
|
|
35
|
-
function ($scope, stage) {
|
|
36
|
-
$scope.stage = stage;
|
|
37
|
-
|
|
38
|
-
$scope.state = {
|
|
39
|
-
accounts: false,
|
|
40
|
-
regionsLoaded: false,
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
AccountService.listAccounts('aws').then(function (accounts) {
|
|
44
|
-
$scope.accounts = accounts;
|
|
45
|
-
$scope.state.accounts = true;
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
$scope.targets = StageConstants.TARGET_LIST;
|
|
49
|
-
|
|
50
|
-
$scope.actions = [
|
|
51
|
-
{
|
|
52
|
-
label: 'Suspend',
|
|
53
|
-
val: 'suspend',
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
label: 'Resume',
|
|
57
|
-
val: 'resume',
|
|
58
|
-
},
|
|
59
|
-
];
|
|
60
|
-
$scope.processes = [
|
|
61
|
-
'Launch',
|
|
62
|
-
'Terminate',
|
|
63
|
-
'AddToLoadBalancer',
|
|
64
|
-
'AlarmNotification',
|
|
65
|
-
'AZRebalance',
|
|
66
|
-
'HealthCheck',
|
|
67
|
-
'ReplaceUnhealthy',
|
|
68
|
-
'ScheduledActions',
|
|
69
|
-
];
|
|
70
|
-
|
|
71
|
-
stage.processes = stage.processes || [];
|
|
72
|
-
stage.regions = stage.regions || [];
|
|
73
|
-
stage.action = stage.action || $scope.actions[0].val;
|
|
74
|
-
stage.target = stage.target || $scope.targets[0].val;
|
|
75
|
-
stage.cloudProvider = 'aws';
|
|
76
|
-
|
|
77
|
-
if (!stage.credentials && $scope.application.defaultCredentials.aws) {
|
|
78
|
-
stage.credentials = $scope.application.defaultCredentials.aws;
|
|
79
|
-
}
|
|
80
|
-
if (!stage.regions.length && $scope.application.defaultRegions.aws) {
|
|
81
|
-
stage.regions.push($scope.application.defaultRegions.aws);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
$scope.toggleProcess = function (process) {
|
|
85
|
-
if (!stage.processes) {
|
|
86
|
-
stage.processes = [];
|
|
87
|
-
}
|
|
88
|
-
const idx = stage.processes.indexOf(process);
|
|
89
|
-
if (idx > -1) {
|
|
90
|
-
stage.processes.splice(idx, 1);
|
|
91
|
-
} else {
|
|
92
|
-
stage.processes.push(process);
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
$scope.$watch('stage.credentials', $scope.accountUpdated);
|
|
97
|
-
},
|
|
98
|
-
]);
|
|
1
|
+
import { Registry } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
import { ModifyScalingProcessStageConfig } from './ModifyScalingProcessStageConfig';
|
|
4
|
+
|
|
5
|
+
export const awsModifyScalingProcessStage = {
|
|
6
|
+
label: 'Modify Scaling Process',
|
|
7
|
+
description: 'Suspend/Resume Scaling Processes',
|
|
8
|
+
key: 'modifyAwsScalingProcess',
|
|
9
|
+
alias: 'modifyScalingProcess',
|
|
10
|
+
component: ModifyScalingProcessStageConfig,
|
|
11
|
+
validators: [
|
|
12
|
+
{ type: 'requiredField', fieldName: 'cluster' },
|
|
13
|
+
{ type: 'requiredField', fieldName: 'target' },
|
|
14
|
+
{ type: 'requiredField', fieldName: 'action' },
|
|
15
|
+
{ type: 'requiredField', fieldName: 'regions' },
|
|
16
|
+
{ type: 'requiredField', fieldName: 'processes' },
|
|
17
|
+
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' },
|
|
18
|
+
],
|
|
19
|
+
cloudProvider: 'aws',
|
|
20
|
+
strategy: true,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export function registerAwsModifyScalingProcessStage() {
|
|
24
|
+
Registry.pipeline.registerStage(awsModifyScalingProcessStage);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
registerAwsModifyScalingProcessStage();
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { mount, shallow } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { AccountRegionClusterSelector, AccountService, ChecklistInput, StageConstants } from '@spinnaker/core';
|
|
5
|
+
|
|
6
|
+
import { AmazonStageConfig } from '../AmazonStageConfig';
|
|
7
|
+
import { awsModifyScalingProcessStage } from './modifyScalingProcessStage';
|
|
8
|
+
|
|
9
|
+
describe('AWS Modify Scaling Process stage', () => {
|
|
10
|
+
function renderEditor(stage: any = {}, pipeline: any = {}) {
|
|
11
|
+
const updateStageField = jasmine.createSpy('updateStageField');
|
|
12
|
+
const updateStage = jasmine.createSpy('updateStage');
|
|
13
|
+
const StageConfig = awsModifyScalingProcessStage.component;
|
|
14
|
+
const stageModel = { type: 'modifyAwsScalingProcess', cloudProviderType: 'aws', ...stage };
|
|
15
|
+
const wrapper = shallow(
|
|
16
|
+
<StageConfig
|
|
17
|
+
{...({
|
|
18
|
+
application: { defaultCredentials: {}, defaultRegions: {}, getDataSource: () => ({ data: [] }) },
|
|
19
|
+
pipeline,
|
|
20
|
+
stage: stageModel,
|
|
21
|
+
updateStage,
|
|
22
|
+
updateStageField,
|
|
23
|
+
} as any)}
|
|
24
|
+
/>,
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
return { stage: stageModel, updateStage, updateStageField, wrapper };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
it('registers a dedicated stage editor', () => {
|
|
31
|
+
expect(awsModifyScalingProcessStage.component).not.toBe(AmazonStageConfig);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('renders the AWS server group selectors for a pipeline stage', () => {
|
|
35
|
+
const { wrapper } = renderEditor({ target: 'current_asg' });
|
|
36
|
+
const target = wrapper.find('select[name="target"]');
|
|
37
|
+
|
|
38
|
+
expect(wrapper.find(AccountRegionClusterSelector).exists()).toBe(true);
|
|
39
|
+
expect(target.exists()).toBe(true);
|
|
40
|
+
if (!wrapper.find(AccountRegionClusterSelector).exists() || !target.exists()) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
expect(target.find('option').map((option) => option.prop('value'))).toEqual(
|
|
44
|
+
StageConstants.TARGET_LIST.map((option) => option.val),
|
|
45
|
+
);
|
|
46
|
+
expect(target.prop('value')).toBe('current_asg');
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('reports account, region, and cluster changes from an unmutated stage', () => {
|
|
50
|
+
const { stage, updateStage, updateStageField, wrapper } = renderEditor({
|
|
51
|
+
credentials: 'test',
|
|
52
|
+
regions: ['eu-west-1'],
|
|
53
|
+
cluster: 'app-main',
|
|
54
|
+
});
|
|
55
|
+
const selector = wrapper.find(AccountRegionClusterSelector);
|
|
56
|
+
const selectorStage = selector.prop('component');
|
|
57
|
+
|
|
58
|
+
expect(selectorStage).not.toBe(stage);
|
|
59
|
+
selectorStage.credentials = 'prod';
|
|
60
|
+
selectorStage.regions = ['us-east-1'];
|
|
61
|
+
selectorStage.cluster = 'app-prod';
|
|
62
|
+
selector.prop('onComponentUpdate')(selectorStage);
|
|
63
|
+
|
|
64
|
+
expect(stage).toEqual(
|
|
65
|
+
jasmine.objectContaining({ credentials: 'test', regions: ['eu-west-1'], cluster: 'app-main' }),
|
|
66
|
+
);
|
|
67
|
+
expect(updateStage).toHaveBeenCalledWith(
|
|
68
|
+
jasmine.objectContaining({ credentials: 'prod', regions: ['us-east-1'], cluster: 'app-prod' }),
|
|
69
|
+
);
|
|
70
|
+
expect(updateStageField).not.toHaveBeenCalled();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('uses the AWS scaling process names and preserves process arrays', () => {
|
|
74
|
+
const processes = ['Launch', 'AZRebalance'];
|
|
75
|
+
const nextProcesses = ['Terminate', 'ScheduledActions'];
|
|
76
|
+
const { updateStageField, wrapper } = renderEditor({ processes });
|
|
77
|
+
const checklist = wrapper.find(ChecklistInput).filterWhere((input) => input.prop('name') === 'processes');
|
|
78
|
+
|
|
79
|
+
expect(checklist.exists()).toBe(true);
|
|
80
|
+
if (!checklist.exists()) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
expect(checklist.prop('stringOptions')).toEqual([
|
|
84
|
+
'Launch',
|
|
85
|
+
'Terminate',
|
|
86
|
+
'AddToLoadBalancer',
|
|
87
|
+
'AlarmNotification',
|
|
88
|
+
'AZRebalance',
|
|
89
|
+
'HealthCheck',
|
|
90
|
+
'ReplaceUnhealthy',
|
|
91
|
+
'ScheduledActions',
|
|
92
|
+
]);
|
|
93
|
+
expect(checklist.prop('value')).toBe(processes);
|
|
94
|
+
|
|
95
|
+
checklist.prop('onChange')({ target: { value: nextProcesses } } as any);
|
|
96
|
+
|
|
97
|
+
expect(updateStageField).toHaveBeenCalledWith({ processes: nextProcesses });
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it('supports suspend and resume while clearing only legacy action fields', () => {
|
|
101
|
+
const processes = ['Launch', 'HealthCheck'];
|
|
102
|
+
const stage = {
|
|
103
|
+
action: 'suspend',
|
|
104
|
+
processes,
|
|
105
|
+
suspendProcesses: ['Terminate'],
|
|
106
|
+
resumeProcesses: ['AZRebalance'],
|
|
107
|
+
};
|
|
108
|
+
const { updateStageField, wrapper } = renderEditor(stage);
|
|
109
|
+
const action = wrapper.find('select[name="action"]');
|
|
110
|
+
|
|
111
|
+
expect(action.exists()).toBe(true);
|
|
112
|
+
if (!action.exists()) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
expect(action.find('option').map((option) => [option.prop('value'), option.text()])).toEqual([
|
|
116
|
+
['suspend', 'Suspend'],
|
|
117
|
+
['resume', 'Resume'],
|
|
118
|
+
]);
|
|
119
|
+
|
|
120
|
+
action.simulate('change', { target: { value: 'resume' } });
|
|
121
|
+
|
|
122
|
+
const changes = updateStageField.calls.mostRecent().args[0];
|
|
123
|
+
expect(changes).toEqual({ action: 'resume', suspendProcesses: undefined, resumeProcesses: undefined });
|
|
124
|
+
expect(Object.prototype.hasOwnProperty.call(changes, 'processes')).toBe(false);
|
|
125
|
+
expect(stage.processes).toBe(processes);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
it('normalizes legacy process fields when reopening without changing action', () => {
|
|
129
|
+
spyOn(AccountService, 'listAccounts').and.returnValue(Promise.resolve([]));
|
|
130
|
+
const processes = ['Launch', 'ScheduledActions'];
|
|
131
|
+
const stage = {
|
|
132
|
+
type: 'modifyAwsScalingProcess',
|
|
133
|
+
cloudProvider: 'aws',
|
|
134
|
+
cloudProviderType: 'aws',
|
|
135
|
+
credentials: 'test',
|
|
136
|
+
regions: ['eu-west-1'],
|
|
137
|
+
cluster: 'app-main',
|
|
138
|
+
target: 'current_asg',
|
|
139
|
+
action: 'suspend',
|
|
140
|
+
processes,
|
|
141
|
+
suspendProcesses: ['Terminate'],
|
|
142
|
+
resumeProcesses: ['AZRebalance'],
|
|
143
|
+
};
|
|
144
|
+
const updateStageField = jasmine.createSpy('updateStageField');
|
|
145
|
+
const StageConfig = awsModifyScalingProcessStage.component;
|
|
146
|
+
const wrapper = mount(
|
|
147
|
+
<StageConfig
|
|
148
|
+
{...({
|
|
149
|
+
application: { defaultCredentials: {}, defaultRegions: {} },
|
|
150
|
+
pipeline: { strategy: true },
|
|
151
|
+
stage,
|
|
152
|
+
updateStage: jasmine.createSpy('updateStage'),
|
|
153
|
+
updateStageField,
|
|
154
|
+
} as any)}
|
|
155
|
+
/>,
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
expect(updateStageField).toHaveBeenCalledWith({
|
|
159
|
+
suspendProcesses: undefined,
|
|
160
|
+
resumeProcesses: undefined,
|
|
161
|
+
});
|
|
162
|
+
expect(Object.prototype.hasOwnProperty.call(updateStageField.calls.mostRecent().args[0], 'processes')).toBe(false);
|
|
163
|
+
expect(stage.processes).toBe(processes);
|
|
164
|
+
|
|
165
|
+
wrapper.unmount();
|
|
166
|
+
});
|
|
167
|
+
});
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { IAccount, IStageConfigProps } from '@spinnaker/core';
|
|
4
|
+
import { AccountRegionClusterSelector, AccountService, StageConfigField, StageConstants } from '@spinnaker/core';
|
|
5
|
+
|
|
6
|
+
const ACTIONS = [
|
|
7
|
+
{ label: 'Upsert', value: 'upsert' },
|
|
8
|
+
{ label: 'Delete', value: 'delete' },
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
const POOL_STATES = ['Stopped', 'Running', 'Hibernated'];
|
|
12
|
+
|
|
13
|
+
export function ModifyWarmPoolStageConfig({
|
|
14
|
+
application,
|
|
15
|
+
pipeline,
|
|
16
|
+
stage,
|
|
17
|
+
updateStage,
|
|
18
|
+
updateStageField,
|
|
19
|
+
}: IStageConfigProps) {
|
|
20
|
+
const [accounts, setAccounts] = React.useState<IAccount[]>([]);
|
|
21
|
+
|
|
22
|
+
React.useEffect(() => {
|
|
23
|
+
let mounted = true;
|
|
24
|
+
AccountService.listAccounts('aws').then((loadedAccounts) => mounted && setAccounts(loadedAccounts));
|
|
25
|
+
return () => {
|
|
26
|
+
mounted = false;
|
|
27
|
+
};
|
|
28
|
+
}, []);
|
|
29
|
+
|
|
30
|
+
React.useEffect(() => {
|
|
31
|
+
const defaults: Record<string, any> = {};
|
|
32
|
+
const defaultCredentials = application.defaultCredentials.aws;
|
|
33
|
+
const defaultRegion = application.defaultRegions.aws;
|
|
34
|
+
|
|
35
|
+
if (!stage.cloudProvider) {
|
|
36
|
+
defaults.cloudProvider = 'aws';
|
|
37
|
+
}
|
|
38
|
+
if (!stage.regions) {
|
|
39
|
+
defaults.regions = defaultRegion ? [defaultRegion] : [];
|
|
40
|
+
} else if (!stage.regions.length && defaultRegion) {
|
|
41
|
+
defaults.regions = [defaultRegion];
|
|
42
|
+
}
|
|
43
|
+
if (!stage.credentials && defaultCredentials) {
|
|
44
|
+
defaults.credentials = defaultCredentials;
|
|
45
|
+
}
|
|
46
|
+
if (!stage.action) {
|
|
47
|
+
defaults.action = ACTIONS[0].value;
|
|
48
|
+
}
|
|
49
|
+
if (!stage.target) {
|
|
50
|
+
defaults.target = StageConstants.TARGET_LIST[0].val;
|
|
51
|
+
}
|
|
52
|
+
if (!stage.poolState) {
|
|
53
|
+
defaults.poolState = POOL_STATES[0];
|
|
54
|
+
}
|
|
55
|
+
if (Object.keys(defaults).length) {
|
|
56
|
+
updateStageField(defaults);
|
|
57
|
+
}
|
|
58
|
+
}, [
|
|
59
|
+
application.defaultCredentials.aws,
|
|
60
|
+
application.defaultRegions.aws,
|
|
61
|
+
stage.action,
|
|
62
|
+
stage.cloudProvider,
|
|
63
|
+
stage.credentials,
|
|
64
|
+
stage.poolState,
|
|
65
|
+
stage.regions,
|
|
66
|
+
stage.target,
|
|
67
|
+
updateStageField,
|
|
68
|
+
]);
|
|
69
|
+
|
|
70
|
+
const isUpsert = (stage.action || ACTIONS[0].value) === 'upsert';
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<div className="form-horizontal">
|
|
74
|
+
{!pipeline.strategy && (
|
|
75
|
+
<AccountRegionClusterSelector
|
|
76
|
+
accounts={accounts}
|
|
77
|
+
application={application}
|
|
78
|
+
component={{ ...stage }}
|
|
79
|
+
onComponentUpdate={updateStage}
|
|
80
|
+
/>
|
|
81
|
+
)}
|
|
82
|
+
<StageConfigField label="Target">
|
|
83
|
+
<select
|
|
84
|
+
className="form-control input-sm"
|
|
85
|
+
name="target"
|
|
86
|
+
onChange={(event) => updateStageField({ target: event.target.value })}
|
|
87
|
+
value={stage.target || StageConstants.TARGET_LIST[0].val}
|
|
88
|
+
>
|
|
89
|
+
{StageConstants.TARGET_LIST.map((target) => (
|
|
90
|
+
<option key={target.val} title={target.description} value={target.val}>
|
|
91
|
+
{target.label}
|
|
92
|
+
</option>
|
|
93
|
+
))}
|
|
94
|
+
</select>
|
|
95
|
+
</StageConfigField>
|
|
96
|
+
<StageConfigField label="Action">
|
|
97
|
+
<select
|
|
98
|
+
className="form-control input-sm"
|
|
99
|
+
name="action"
|
|
100
|
+
onChange={(event) => updateStageField({ action: event.target.value })}
|
|
101
|
+
value={stage.action || ACTIONS[0].value}
|
|
102
|
+
>
|
|
103
|
+
{ACTIONS.map((action) => (
|
|
104
|
+
<option key={action.value} value={action.value}>
|
|
105
|
+
{action.label}
|
|
106
|
+
</option>
|
|
107
|
+
))}
|
|
108
|
+
</select>
|
|
109
|
+
</StageConfigField>
|
|
110
|
+
{isUpsert && (
|
|
111
|
+
<>
|
|
112
|
+
<StageConfigField label="Min Size">
|
|
113
|
+
<input
|
|
114
|
+
className="form-control input-sm"
|
|
115
|
+
type="number"
|
|
116
|
+
min={0}
|
|
117
|
+
name="minSize"
|
|
118
|
+
onChange={(event) => updateStageField({ minSize: Number(event.target.value) })}
|
|
119
|
+
value={stage.minSize ?? 0}
|
|
120
|
+
/>
|
|
121
|
+
</StageConfigField>
|
|
122
|
+
<StageConfigField label="Max Group Prepared Capacity">
|
|
123
|
+
<input
|
|
124
|
+
className="form-control input-sm"
|
|
125
|
+
type="number"
|
|
126
|
+
min={-1}
|
|
127
|
+
name="maxGroupPreparedCapacity"
|
|
128
|
+
onChange={(event) => updateStageField({ maxGroupPreparedCapacity: Number(event.target.value) })}
|
|
129
|
+
value={stage.maxGroupPreparedCapacity ?? -1}
|
|
130
|
+
/>
|
|
131
|
+
</StageConfigField>
|
|
132
|
+
<StageConfigField label="Instance State">
|
|
133
|
+
<select
|
|
134
|
+
className="form-control input-sm"
|
|
135
|
+
name="poolState"
|
|
136
|
+
onChange={(event) => updateStageField({ poolState: event.target.value })}
|
|
137
|
+
value={stage.poolState || POOL_STATES[0]}
|
|
138
|
+
>
|
|
139
|
+
{POOL_STATES.map((state) => (
|
|
140
|
+
<option key={state} value={state}>
|
|
141
|
+
{state}
|
|
142
|
+
</option>
|
|
143
|
+
))}
|
|
144
|
+
</select>
|
|
145
|
+
</StageConfigField>
|
|
146
|
+
<StageConfigField label="Reuse Instances on Scale In">
|
|
147
|
+
<input
|
|
148
|
+
type="checkbox"
|
|
149
|
+
checked={!!stage.reuseOnScaleIn}
|
|
150
|
+
onChange={(event) => updateStageField({ reuseOnScaleIn: event.target.checked })}
|
|
151
|
+
/>
|
|
152
|
+
</StageConfigField>
|
|
153
|
+
</>
|
|
154
|
+
)}
|
|
155
|
+
</div>
|
|
156
|
+
);
|
|
157
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Registry } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
import { ModifyWarmPoolStageConfig } from './ModifyWarmPoolStageConfig';
|
|
4
|
+
|
|
5
|
+
export const awsModifyWarmPoolStage = {
|
|
6
|
+
label: 'Modify Warm Pool',
|
|
7
|
+
description: 'Upsert or delete an Auto Scaling Group warm pool',
|
|
8
|
+
key: 'modifyWarmPool',
|
|
9
|
+
component: ModifyWarmPoolStageConfig,
|
|
10
|
+
executionConfigSections: ['modifyWarmPoolConfig', 'taskStatus'],
|
|
11
|
+
validators: [
|
|
12
|
+
{ type: 'requiredField', fieldName: 'cluster' },
|
|
13
|
+
{ type: 'requiredField', fieldName: 'target' },
|
|
14
|
+
{ type: 'requiredField', fieldName: 'action' },
|
|
15
|
+
{ type: 'requiredField', fieldName: 'regions' },
|
|
16
|
+
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' },
|
|
17
|
+
],
|
|
18
|
+
cloudProvider: 'aws',
|
|
19
|
+
strategy: true,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export function registerAwsModifyWarmPoolStage() {
|
|
23
|
+
Registry.pipeline.registerStage(awsModifyWarmPoolStage);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
registerAwsModifyWarmPoolStage();
|