@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
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import type { IStageTypeConfig } from '@spinnaker/core';
|
|
2
|
+
import { CloudProviderRegistry, Registry } from '@spinnaker/core';
|
|
3
|
+
|
|
4
|
+
import './index';
|
|
5
|
+
import { AwsFunctionTransformer } from './function/function.transformer';
|
|
6
|
+
import { AwsImageReader } from './image';
|
|
7
|
+
import { AwsInstanceTypeService } from './instance/awsInstanceType.service';
|
|
8
|
+
import { AwsLoadBalancerTransformer } from './loadBalancer';
|
|
9
|
+
import { AmazonStageConfig, getAmazonStageFields } from './pipeline/stages/AmazonStageConfig';
|
|
10
|
+
import { awsBakeStage, AwsBakeStageConfig } from './pipeline/stages/bake/AwsBakeStageConfig';
|
|
11
|
+
import { AwsCloneServerGroupStageConfig } from './pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig';
|
|
12
|
+
import { DeployCloudFormationStackStageConfig } from './pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig';
|
|
13
|
+
import { AwsDisableAsgStageConfig } from './pipeline/stages/disableAsg/AwsDisableAsgStageConfig';
|
|
14
|
+
import { AwsDisableClusterStageConfig } from './pipeline/stages/disableCluster/AwsDisableClusterStageConfig';
|
|
15
|
+
import { AwsEnableAsgStageConfig } from './pipeline/stages/enableAsg/AwsEnableAsgStageConfig';
|
|
16
|
+
import { AwsFindImageFromTagsStageConfig } from './pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig';
|
|
17
|
+
import { ModifyScalingProcessStageConfig } from './pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig';
|
|
18
|
+
import { AwsResizeAsgStageConfig } from './pipeline/stages/resizeAsg/AwsResizeAsgStageConfig';
|
|
19
|
+
import { AwsRollbackClusterStageConfig } from './pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig';
|
|
20
|
+
import { AwsScaleDownClusterStageConfig } from './pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig';
|
|
21
|
+
import { AwsShrinkClusterStageConfig } from './pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig';
|
|
22
|
+
import { AwsTagImageStageConfig } from './pipeline/stages/tagImage/awsTagImageStage';
|
|
23
|
+
import { registerAmazonPipelineStages } from './aws.module';
|
|
24
|
+
import { AwsSecurityGroupReader } from './securityGroup/securityGroup.reader';
|
|
25
|
+
import { AwsSecurityGroupTransformer } from './securityGroup/securityGroup.transformer';
|
|
26
|
+
import { AwsServerGroupCommandBuilder } from './serverGroup/configure/serverGroupCommandBuilder.service';
|
|
27
|
+
import {
|
|
28
|
+
AwsServerGroupConfigurationService,
|
|
29
|
+
AwsServerGroupConfigurationServiceDelegate,
|
|
30
|
+
} from './serverGroup/configure/serverGroupConfiguration.service';
|
|
31
|
+
import { AwsServerGroupTransformer } from './serverGroup/serverGroup.transformer';
|
|
32
|
+
|
|
33
|
+
describe('Amazon package registration', () => {
|
|
34
|
+
function expectRegistered(path: string): void {
|
|
35
|
+
expect(CloudProviderRegistry.getValue('aws', path)).withContext(path).not.toBeNull();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function expectNonEmptyRegistration(path: string): void {
|
|
39
|
+
const value = CloudProviderRegistry.getValue('aws', path);
|
|
40
|
+
const entries = Array.isArray(value) ? value : [];
|
|
41
|
+
expect(Array.isArray(value)).withContext(path).toBe(true);
|
|
42
|
+
expect(entries.length).withContext(path).toBeGreaterThan(0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
it('does not register function details as a provider override', () => {
|
|
46
|
+
const overrideValue = spyOn(CloudProviderRegistry, 'overrideValue');
|
|
47
|
+
const functionDetailsModule = require.resolve('./function/details/AmazonFunctionDetails');
|
|
48
|
+
delete require.cache[functionDetailsModule];
|
|
49
|
+
|
|
50
|
+
require('./function/details/AmazonFunctionDetails');
|
|
51
|
+
|
|
52
|
+
expect(overrideValue).not.toHaveBeenCalled();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('registers AWS provider values', () => {
|
|
56
|
+
expect(CloudProviderRegistry.getValue('aws', 'image.reader')).toBe(AwsImageReader);
|
|
57
|
+
expect(CloudProviderRegistry.getValue('aws', 'serverGroup.transformer')).toBe(AwsServerGroupTransformer);
|
|
58
|
+
expect(CloudProviderRegistry.getValue('aws', 'serverGroup.commandBuilder')).toBe(AwsServerGroupCommandBuilder);
|
|
59
|
+
expect(CloudProviderRegistry.getValue('aws', 'serverGroup.configurationService')).toBe(
|
|
60
|
+
AwsServerGroupConfigurationServiceDelegate,
|
|
61
|
+
);
|
|
62
|
+
expect(CloudProviderRegistry.getValue('aws', 'instance.instanceTypeService')).toBe(AwsInstanceTypeService);
|
|
63
|
+
expect(CloudProviderRegistry.getValue('aws', 'loadBalancer.transformer')).toBe(AwsLoadBalancerTransformer);
|
|
64
|
+
expect(CloudProviderRegistry.getValue('aws', 'function.transformer')).toBe(AwsFunctionTransformer);
|
|
65
|
+
expect(CloudProviderRegistry.getValue('aws', 'function.setTransformer')).toBe(AwsFunctionTransformer);
|
|
66
|
+
expect(CloudProviderRegistry.getValue('aws', 'securityGroup.reader')).toBe(AwsSecurityGroupReader);
|
|
67
|
+
expect(CloudProviderRegistry.getValue('aws', 'securityGroup.transformer')).toBe(AwsSecurityGroupTransformer);
|
|
68
|
+
expect(CloudProviderRegistry.getValue('aws', 'applicationProviderFields')).toEqual([
|
|
69
|
+
{
|
|
70
|
+
field: 'useAmiBlockDeviceMappings',
|
|
71
|
+
label: 'Prefer AMI Block Device Mappings',
|
|
72
|
+
type: 'boolean',
|
|
73
|
+
},
|
|
74
|
+
]);
|
|
75
|
+
|
|
76
|
+
expectRegistered('serverGroup.CloneServerGroupModal');
|
|
77
|
+
expectRegistered('serverGroup.detailsGetter');
|
|
78
|
+
expectRegistered('serverGroup.detailsActions');
|
|
79
|
+
expectNonEmptyRegistration('serverGroup.detailsSections');
|
|
80
|
+
expectRegistered('instance.details');
|
|
81
|
+
expectRegistered('loadBalancer.CreateLoadBalancerModal');
|
|
82
|
+
expectRegistered('loadBalancer.useDetailsHook');
|
|
83
|
+
expectRegistered('loadBalancer.detailsActions');
|
|
84
|
+
expectNonEmptyRegistration('loadBalancer.detailsSections');
|
|
85
|
+
expectRegistered('loadBalancer.targetGroupDetails');
|
|
86
|
+
expectRegistered('function.details');
|
|
87
|
+
expectRegistered('function.CreateFunctionModal');
|
|
88
|
+
expectRegistered('securityGroup.CreateSecurityGroupModal');
|
|
89
|
+
expectRegistered('securityGroup.details');
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it('registers AWS provider delegates as direct constructors', () => {
|
|
93
|
+
expect(typeof CloudProviderRegistry.getValue('aws', 'serverGroup.transformer')).toBe('function');
|
|
94
|
+
expect(typeof CloudProviderRegistry.getValue('aws', 'serverGroup.commandBuilder')).toBe('function');
|
|
95
|
+
expect(typeof CloudProviderRegistry.getValue('aws', 'serverGroup.configurationService')).toBe('function');
|
|
96
|
+
expect(typeof CloudProviderRegistry.getValue('aws', 'instance.instanceTypeService')).toBe('function');
|
|
97
|
+
expect(typeof CloudProviderRegistry.getValue('aws', 'loadBalancer.transformer')).toBe('function');
|
|
98
|
+
expect(typeof CloudProviderRegistry.getValue('aws', 'function.transformer')).toBe('function');
|
|
99
|
+
expect(typeof CloudProviderRegistry.getValue('aws', 'function.setTransformer')).toBe('function');
|
|
100
|
+
expect(typeof CloudProviderRegistry.getValue('aws', 'securityGroup.reader')).toBe('function');
|
|
101
|
+
expect(typeof CloudProviderRegistry.getValue('aws', 'securityGroup.transformer')).toBe('function');
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it('constructs the server group configuration service with explicit dependencies', () => {
|
|
105
|
+
const securityGroupReader = { getAllSecurityGroups: jasmine.createSpy('getAllSecurityGroups') };
|
|
106
|
+
const cacheInitializer = {
|
|
107
|
+
refreshCache: jasmine.createSpy('refreshCache'),
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const service = new AwsServerGroupConfigurationService(
|
|
111
|
+
securityGroupReader as any,
|
|
112
|
+
new AwsInstanceTypeService(),
|
|
113
|
+
cacheInitializer as any,
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
expect((service as any).securityGroupReader).toBe(securityGroupReader);
|
|
117
|
+
expect(() => service.applyOverrides('beforeConfiguration', {} as any)).not.toThrow();
|
|
118
|
+
|
|
119
|
+
const command = {
|
|
120
|
+
region: 'us-east-1',
|
|
121
|
+
virtualizationType: 'hvm',
|
|
122
|
+
vpcId: 'vpc-1',
|
|
123
|
+
amiArchitecture: 'x86_64',
|
|
124
|
+
backingData: {
|
|
125
|
+
instanceTypesInfo: {
|
|
126
|
+
'us-east-1': [
|
|
127
|
+
{
|
|
128
|
+
name: 'm5.large',
|
|
129
|
+
supportedVirtualizationTypes: ['hvm'],
|
|
130
|
+
supportedArchitectures: ['x86_64'],
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
filtered: {},
|
|
135
|
+
},
|
|
136
|
+
launchTemplateOverridesForInstanceType: [],
|
|
137
|
+
viewState: { dirty: {} },
|
|
138
|
+
} as any;
|
|
139
|
+
|
|
140
|
+
expect(() => service.configureInstanceTypes(command)).not.toThrow();
|
|
141
|
+
expect(command.backingData.filtered.instanceTypes).toEqual(['m5.large']);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
it('registers AWS pipeline stages with React components', () => {
|
|
145
|
+
const previousPipeline = Registry.pipeline;
|
|
146
|
+
const previousUrlBuilder = Registry.urlBuilder;
|
|
147
|
+
|
|
148
|
+
Registry.reinitialize();
|
|
149
|
+
try {
|
|
150
|
+
registerAmazonPipelineStages();
|
|
151
|
+
|
|
152
|
+
const stages = Registry.pipeline.getStageTypes();
|
|
153
|
+
|
|
154
|
+
const awsStages = stages.filter((stage) => stage.cloudProvider === 'aws');
|
|
155
|
+
const expectedStages = [
|
|
156
|
+
'bake',
|
|
157
|
+
'cloneServerGroup',
|
|
158
|
+
'deployCloudFormation',
|
|
159
|
+
'destroyServerGroup',
|
|
160
|
+
'disableCluster',
|
|
161
|
+
'disableServerGroup',
|
|
162
|
+
'enableServerGroup',
|
|
163
|
+
'findImage',
|
|
164
|
+
'findImageFromTags',
|
|
165
|
+
'modifyAwsScalingProcess',
|
|
166
|
+
'resizeServerGroup',
|
|
167
|
+
'rollbackCluster',
|
|
168
|
+
'scaleDownCluster',
|
|
169
|
+
'shrinkCluster',
|
|
170
|
+
'upsertImageTags',
|
|
171
|
+
];
|
|
172
|
+
|
|
173
|
+
expectedStages.forEach((provides) => {
|
|
174
|
+
const stage = awsStages.find((candidate) => (candidate.provides || candidate.key) === provides);
|
|
175
|
+
expect(stage).withContext(`aws ${provides} stage`).toBeDefined();
|
|
176
|
+
expect(stage?.component).withContext(`aws ${provides} stage component`).toBeDefined();
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
const structuredStages: Array<{
|
|
180
|
+
component: IStageTypeConfig['component'];
|
|
181
|
+
key: string;
|
|
182
|
+
}> = [
|
|
183
|
+
{
|
|
184
|
+
key: 'bake',
|
|
185
|
+
component: AwsBakeStageConfig,
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
key: 'cloneServerGroup',
|
|
189
|
+
component: AwsCloneServerGroupStageConfig,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
key: 'deployCloudFormation',
|
|
193
|
+
component: DeployCloudFormationStackStageConfig,
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
key: 'disableServerGroup',
|
|
197
|
+
component: AwsDisableAsgStageConfig,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
key: 'disableCluster',
|
|
201
|
+
component: AwsDisableClusterStageConfig,
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
key: 'enableServerGroup',
|
|
205
|
+
component: AwsEnableAsgStageConfig,
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
key: 'upsertImageTags',
|
|
209
|
+
component: AwsTagImageStageConfig,
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
key: 'findImageFromTags',
|
|
213
|
+
component: AwsFindImageFromTagsStageConfig,
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
key: 'resizeServerGroup',
|
|
217
|
+
component: AwsResizeAsgStageConfig,
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
key: 'rollbackCluster',
|
|
221
|
+
component: AwsRollbackClusterStageConfig,
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
key: 'scaleDownCluster',
|
|
225
|
+
component: AwsScaleDownClusterStageConfig,
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
key: 'shrinkCluster',
|
|
229
|
+
component: AwsShrinkClusterStageConfig,
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
key: 'modifyAwsScalingProcess',
|
|
233
|
+
component: ModifyScalingProcessStageConfig,
|
|
234
|
+
},
|
|
235
|
+
];
|
|
236
|
+
|
|
237
|
+
structuredStages.forEach(({ component, key }) => {
|
|
238
|
+
const stage = awsStages.find((candidate) => (candidate.key || candidate.provides) === key);
|
|
239
|
+
expect(stage).withContext(`aws ${key} structured stage`).toBeDefined();
|
|
240
|
+
expect(stage?.key).withContext(`aws ${key} stage key`).toBe(key);
|
|
241
|
+
expect(stage?.cloudProvider).withContext(`aws ${key} cloud provider`).toBe('aws');
|
|
242
|
+
expect(stage?.component).withContext(`aws ${key} config component`).toBe(component);
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
const deployCloudFormation = awsStages.find((stage) => stage.key === 'deployCloudFormation');
|
|
246
|
+
expect(deployCloudFormation?.executionDetailsSections?.length)
|
|
247
|
+
.withContext('aws deployCloudFormation React execution details')
|
|
248
|
+
.toBeGreaterThan(0);
|
|
249
|
+
|
|
250
|
+
['destroyServerGroup', 'findImage'].forEach((key) => {
|
|
251
|
+
const stage = awsStages.find((candidate) => (candidate.key || candidate.provides) === key);
|
|
252
|
+
expect(stage?.component).withContext(`aws ${key} generic stage component`).toBe(AmazonStageConfig);
|
|
253
|
+
});
|
|
254
|
+
} finally {
|
|
255
|
+
Registry.pipeline = previousPipeline;
|
|
256
|
+
Registry.urlBuilder = previousUrlBuilder;
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
it('does not duplicate AWS pipeline stages on module import', () => {
|
|
261
|
+
const awsStages = Registry.pipeline.getStageTypes().filter((stage) => stage.cloudProvider === 'aws');
|
|
262
|
+
const expectedStages = [
|
|
263
|
+
'bake',
|
|
264
|
+
'cloneServerGroup',
|
|
265
|
+
'deployCloudFormation',
|
|
266
|
+
'destroyServerGroup',
|
|
267
|
+
'disableCluster',
|
|
268
|
+
'disableServerGroup',
|
|
269
|
+
'enableServerGroup',
|
|
270
|
+
'findImage',
|
|
271
|
+
'findImageFromTags',
|
|
272
|
+
'modifyAwsScalingProcess',
|
|
273
|
+
'resizeServerGroup',
|
|
274
|
+
'rollbackCluster',
|
|
275
|
+
'scaleDownCluster',
|
|
276
|
+
'shrinkCluster',
|
|
277
|
+
'upsertImageTags',
|
|
278
|
+
];
|
|
279
|
+
|
|
280
|
+
expectedStages.forEach((provides) => {
|
|
281
|
+
const registrations = awsStages.filter((stage) => (stage.provides || stage.key) === provides);
|
|
282
|
+
expect(registrations.length).withContext(`aws ${provides} registration count`).toBe(1);
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
it('renders required AWS stage-specific config fields', () => {
|
|
287
|
+
expect(awsBakeStage.validators.map((validator: any) => validator.fieldName)).toContain('package');
|
|
288
|
+
expect(getAmazonStageFields({ type: 'findImage' } as any).map((field) => field.fieldName)).toEqual([
|
|
289
|
+
'credentials',
|
|
290
|
+
'regions',
|
|
291
|
+
'cluster',
|
|
292
|
+
'selectionStrategy',
|
|
293
|
+
'onlyEnabled',
|
|
294
|
+
]);
|
|
295
|
+
});
|
|
296
|
+
});
|
package/src/aws.module.ts
CHANGED
|
@@ -1,55 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { CloudProviderRegistry, DeploymentStrategyRegistry } from '@spinnaker/core';
|
|
1
|
+
import { CloudProviderRegistry, DeploymentStrategyRegistry, Registry } from '@spinnaker/core';
|
|
4
2
|
|
|
5
3
|
import { AWSProviderSettings } from './aws.settings';
|
|
6
|
-
import { COMMON_MODULE } from './common/common.module';
|
|
7
4
|
import './deploymentStrategy/rollingPush.strategy';
|
|
8
5
|
import { AmazonFunctionDetails } from './function';
|
|
9
6
|
import { CreateLambdaFunction } from './function';
|
|
10
7
|
import { AwsFunctionTransformer } from './function';
|
|
11
|
-
import { AWS_FUNCTION_MODULE } from './function/function.module';
|
|
12
8
|
import './help/amazon.help';
|
|
13
9
|
import { AwsImageReader } from './image';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { AMAZON_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER } from './instance/details/instance.details.controller';
|
|
17
|
-
import { INSTANCE_DNS_COMPONENT } from './instance/details/instanceDns.component';
|
|
18
|
-
import { INSTANCE_SECURITY_GROUPS_COMPONENT } from './instance/details/instanceSecurityGroups.component';
|
|
19
|
-
import { INSTANCE_STATUS_COMPONENT } from './instance/details/instanceStatus.component';
|
|
20
|
-
import { INSTANCE_TAGS_COMPONENT } from './instance/details/instanceTags.component';
|
|
10
|
+
import { AwsInstanceTypeService } from './instance/awsInstanceType.service';
|
|
11
|
+
import { AmazonInstanceDetails } from './instance/details/AmazonInstanceDetails';
|
|
21
12
|
import { AmazonLoadBalancerClusterContainer } from './loadBalancer';
|
|
22
13
|
import { AmazonLoadBalancersTag } from './loadBalancer';
|
|
23
14
|
import { AmazonLoadBalancerChoiceModal } from './loadBalancer';
|
|
24
15
|
import { AwsLoadBalancerTransformer } from './loadBalancer';
|
|
25
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
AmazonLoadBalancerActions,
|
|
18
|
+
amazonLoadBalancerDetailsSections,
|
|
19
|
+
TargetGroupDetails,
|
|
20
|
+
useAmazonLoadBalancerDetails,
|
|
21
|
+
} from './loadBalancer';
|
|
26
22
|
import amazonLogo from './logo/amazon.logo.svg';
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
23
|
+
import { registerAwsBakeStage } from './pipeline/stages/bake/AwsBakeStageConfig';
|
|
24
|
+
import { registerAwsCloneServerGroupStage } from './pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig';
|
|
25
|
+
import { registerLambdaDeleteStage } from './pipeline/stages/deleteLambda';
|
|
26
|
+
import { registerDeployCloudFormationStackStage } from './pipeline/stages/deployCloudFormation/deployCloudFormationStackStage';
|
|
27
|
+
import { registerLambdaDeployStage } from './pipeline/stages/deployLambda';
|
|
28
|
+
import { registerAwsDestroyAsgStage } from './pipeline/stages/destroyAsg/awsDestroyAsgStage';
|
|
29
|
+
import { registerAwsDisableAsgStage } from './pipeline/stages/disableAsg/AwsDisableAsgStageConfig';
|
|
30
|
+
import { registerAwsDisableClusterStage } from './pipeline/stages/disableCluster/AwsDisableClusterStageConfig';
|
|
31
|
+
import { registerAwsEnableAsgStage } from './pipeline/stages/enableAsg/AwsEnableAsgStageConfig';
|
|
32
|
+
import { registerAwsFindAmiStage } from './pipeline/stages/findAmi/awsFindAmiStage';
|
|
33
|
+
import { registerAwsFindImageFromTagsStage } from './pipeline/stages/findImageFromTags/awsFindImageFromTagsStage';
|
|
34
|
+
import { registerLambdaInvokeStage } from './pipeline/stages/invokeLambda';
|
|
35
|
+
import { registerAwsModifyScalingProcessStage } from './pipeline/stages/modifyScalingProcess/modifyScalingProcessStage';
|
|
36
|
+
import { registerAwsModifyWarmPoolStage } from './pipeline/stages/modifyWarmPool/modifyWarmPoolStage';
|
|
37
|
+
import { registerAwsResizeAsgStage } from './pipeline/stages/resizeAsg/awsResizeAsgStage';
|
|
38
|
+
import { registerAwsRollbackClusterStage } from './pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig';
|
|
39
|
+
import { registerLambdaRouteStage } from './pipeline/stages/routeLambda';
|
|
40
|
+
import { registerAwsScaleDownClusterStage } from './pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig';
|
|
41
|
+
import { registerAwsShrinkClusterStage } from './pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig';
|
|
42
|
+
import { registerAwsTagImageStage } from './pipeline/stages/tagImage/awsTagImageStage';
|
|
43
|
+
import { registerLambdaUpdateStage } from './pipeline/stages/updateCodeLambda';
|
|
44
|
+
import { AmazonSecurityGroupModal } from './securityGroup/configure/AmazonSecurityGroupModal';
|
|
45
|
+
import { AmazonSecurityGroupDetails } from './securityGroup/details/AmazonSecurityGroupDetails';
|
|
46
|
+
import { AwsSecurityGroupReader } from './securityGroup/securityGroup.reader';
|
|
47
|
+
import { AwsSecurityGroupTransformer } from './securityGroup/securityGroup.transformer';
|
|
48
|
+
import { AwsServerGroupCommandBuilder } from './serverGroup/configure/serverGroupCommandBuilder.service';
|
|
49
|
+
import { AwsServerGroupConfigurationServiceDelegate } from './serverGroup/configure/serverGroupConfiguration.service';
|
|
53
50
|
import { AmazonCloneServerGroupModal } from './serverGroup/configure/wizard/AmazonCloneServerGroupModal';
|
|
54
51
|
import { AmazonServerGroupActions } from './serverGroup/details/AmazonServerGroupActions';
|
|
55
52
|
import { amazonServerGroupDetailsGetter } from './serverGroup/details/amazonServerGroupDetailsGetter';
|
|
@@ -73,69 +70,32 @@ import {
|
|
|
73
70
|
ScheduledActionsDetailsSection,
|
|
74
71
|
SecurityGroupsDetailsSection,
|
|
75
72
|
TagsDetailsSection,
|
|
73
|
+
WarmPoolDetailsSection,
|
|
76
74
|
} from './serverGroup/details/sections';
|
|
77
|
-
import {
|
|
78
|
-
import { AWS_SERVER_GROUP_TRANSFORMER } from './serverGroup/serverGroup.transformer';
|
|
79
|
-
import { SUBNET_RENDERER } from './subnet/subnet.renderer';
|
|
75
|
+
import { AwsServerGroupTransformer } from './serverGroup/serverGroup.transformer';
|
|
80
76
|
import './validation/ApplicationNameValidator';
|
|
81
|
-
import { VPC_MODULE } from './vpc/vpc.module';
|
|
82
77
|
|
|
83
78
|
import './logo/aws.logo.less';
|
|
84
79
|
|
|
85
|
-
export
|
|
86
|
-
module(AMAZON_MODULE, [
|
|
87
|
-
AWS_REACT_MODULE,
|
|
88
|
-
AMAZON_PIPELINE_STAGES_BAKE_AWSBAKESTAGE,
|
|
89
|
-
AMAZON_PIPELINE_STAGES_CLONESERVERGROUP_AWSCLONESERVERGROUPSTAGE,
|
|
90
|
-
AMAZON_PIPELINE_STAGES_DESTROYASG_AWSDESTROYASGSTAGE,
|
|
91
|
-
AMAZON_PIPELINE_STAGES_DISABLEASG_AWSDISABLEASGSTAGE,
|
|
92
|
-
AMAZON_PIPELINE_STAGES_DISABLECLUSTER_AWSDISABLECLUSTERSTAGE,
|
|
93
|
-
AMAZON_PIPELINE_STAGES_ROLLBACKCLUSTER_AWSROLLBACKCLUSTERSTAGE,
|
|
94
|
-
AMAZON_PIPELINE_STAGES_ENABLEASG_AWSENABLEASGSTAGE,
|
|
95
|
-
AMAZON_PIPELINE_STAGES_FINDAMI_AWSFINDAMISTAGE,
|
|
96
|
-
AMAZON_PIPELINE_STAGES_FINDIMAGEFROMTAGS_AWSFINDIMAGEFROMTAGSSTAGE,
|
|
97
|
-
AMAZON_PIPELINE_STAGES_MODIFYSCALINGPROCESS_MODIFYSCALINGPROCESSSTAGE,
|
|
98
|
-
AMAZON_PIPELINE_STAGES_RESIZEASG_AWSRESIZEASGSTAGE,
|
|
99
|
-
AMAZON_PIPELINE_STAGES_SCALEDOWNCLUSTER_AWSSCALEDOWNCLUSTERSTAGE,
|
|
100
|
-
AMAZON_PIPELINE_STAGES_SHRINKCLUSTER_AWSSHRINKCLUSTERSTAGE,
|
|
101
|
-
AMAZON_PIPELINE_STAGES_TAGIMAGE_AWSTAGIMAGESTAGE,
|
|
102
|
-
SERVER_GROUP_DETAILS_MODULE,
|
|
103
|
-
COMMON_MODULE,
|
|
104
|
-
AWS_SERVER_GROUP_TRANSFORMER,
|
|
105
|
-
AMAZON_INSTANCE_AWSINSTANCETYPE_SERVICE,
|
|
106
|
-
AWS_LOAD_BALANCER_MODULE,
|
|
107
|
-
AWS_FUNCTION_MODULE,
|
|
108
|
-
AMAZON_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER,
|
|
109
|
-
AWS_SECURITY_GROUP_MODULE,
|
|
110
|
-
SUBNET_RENDERER,
|
|
111
|
-
VPC_MODULE,
|
|
112
|
-
AMAZON_SEARCH_SEARCHRESULTFORMATTER,
|
|
113
|
-
DEPLOY_CLOUDFORMATION_STACK_STAGE,
|
|
114
|
-
CLOUDFORMATION_TEMPLATE_ENTRY,
|
|
115
|
-
CLOUD_FORMATION_CHANGE_SET_INFO,
|
|
116
|
-
AWS_EVALUATE_CLOUD_FORMATION_CHANGE_SET_EXECUTION_SERVICE,
|
|
117
|
-
INSTANCE_STATUS_COMPONENT,
|
|
118
|
-
INSTANCE_TAGS_COMPONENT,
|
|
119
|
-
INSTANCE_SECURITY_GROUPS_COMPONENT,
|
|
120
|
-
INSTANCE_DNS_COMPONENT,
|
|
121
|
-
AMAZON_INSTANCE_INFORMATION_COMPONENT,
|
|
122
|
-
AMAZON_PIPELINE_STAGES_LAMBDA_DELETE,
|
|
123
|
-
AMAZON_PIPELINE_STAGES_LAMBDA_DEPLOY,
|
|
124
|
-
AMAZON_PIPELINE_STAGES_LAMBDA_INVOKE,
|
|
125
|
-
AMAZON_PIPELINE_STAGES_LAMBDA_UPDATE,
|
|
126
|
-
AMAZON_PIPELINE_STAGES_LAMBDA_ROUTE,
|
|
127
|
-
]).config(() => {
|
|
80
|
+
export function registerAmazonProvider(): void {
|
|
128
81
|
CloudProviderRegistry.registerProvider('aws', {
|
|
129
82
|
name: 'Amazon',
|
|
130
83
|
adHocInfrastructureWritesEnabled: AWSProviderSettings.adHocInfraWritesEnabled,
|
|
131
84
|
logo: {
|
|
132
85
|
path: amazonLogo,
|
|
133
86
|
},
|
|
87
|
+
applicationProviderFields: [
|
|
88
|
+
{
|
|
89
|
+
field: 'useAmiBlockDeviceMappings',
|
|
90
|
+
label: 'Prefer AMI Block Device Mappings',
|
|
91
|
+
type: 'boolean',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
134
94
|
image: {
|
|
135
95
|
reader: AwsImageReader,
|
|
136
96
|
},
|
|
137
97
|
serverGroup: {
|
|
138
|
-
transformer:
|
|
98
|
+
transformer: AwsServerGroupTransformer,
|
|
139
99
|
detailsActions: AmazonServerGroupActions,
|
|
140
100
|
detailsGetter: amazonServerGroupDetailsGetter,
|
|
141
101
|
detailsSections: [
|
|
@@ -149,58 +109,93 @@ module(AMAZON_MODULE, [
|
|
|
149
109
|
ScalingProcessesDetailsSection,
|
|
150
110
|
ScalingPoliciesDetailsSection,
|
|
151
111
|
ScheduledActionsDetailsSection,
|
|
112
|
+
WarmPoolDetailsSection,
|
|
152
113
|
TagsDetailsSection,
|
|
153
114
|
PackageDetailsSection,
|
|
154
115
|
AdvancedSettingsDetailsSection,
|
|
155
116
|
LogsDetailsSection,
|
|
156
117
|
],
|
|
157
118
|
CloneServerGroupModal: AmazonCloneServerGroupModal,
|
|
158
|
-
commandBuilder:
|
|
159
|
-
configurationService:
|
|
119
|
+
commandBuilder: AwsServerGroupCommandBuilder,
|
|
120
|
+
configurationService: AwsServerGroupConfigurationServiceDelegate,
|
|
121
|
+
instanceTypeService: AwsInstanceTypeService,
|
|
160
122
|
scalingActivitiesEnabled: true,
|
|
161
123
|
TargetTrackingChart,
|
|
162
124
|
UpsertStepPolicyModal: AmazonUpsertScalingPolicyModal,
|
|
163
125
|
UpsertTargetTrackingModal: AmazonUpsertTargetTrackingModal,
|
|
164
126
|
},
|
|
165
127
|
instance: {
|
|
166
|
-
instanceTypeService:
|
|
167
|
-
|
|
168
|
-
detailsController: 'awsInstanceDetailsCtrl',
|
|
128
|
+
instanceTypeService: AwsInstanceTypeService,
|
|
129
|
+
details: AmazonInstanceDetails,
|
|
169
130
|
},
|
|
170
131
|
loadBalancer: {
|
|
171
132
|
transformer: AwsLoadBalancerTransformer,
|
|
172
|
-
detailsTemplateUrl: require('./loadBalancer/details/loadBalancerDetails.html'),
|
|
173
|
-
detailsController: 'awsLoadBalancerDetailsCtrl',
|
|
174
133
|
CreateLoadBalancerModal: AmazonLoadBalancerChoiceModal,
|
|
175
|
-
|
|
176
|
-
|
|
134
|
+
useDetailsHook: useAmazonLoadBalancerDetails,
|
|
135
|
+
detailsActions: AmazonLoadBalancerActions,
|
|
136
|
+
detailsSections: amazonLoadBalancerDetailsSections,
|
|
137
|
+
targetGroupDetails: TargetGroupDetails,
|
|
177
138
|
ClusterContainer: AmazonLoadBalancerClusterContainer,
|
|
178
139
|
LoadBalancersTag: AmazonLoadBalancersTag,
|
|
179
140
|
},
|
|
180
141
|
function: {
|
|
181
142
|
details: AmazonFunctionDetails,
|
|
182
143
|
CreateFunctionModal: CreateLambdaFunction,
|
|
144
|
+
setTransformer: AwsFunctionTransformer,
|
|
183
145
|
transformer: AwsFunctionTransformer,
|
|
184
146
|
},
|
|
185
147
|
securityGroup: {
|
|
186
|
-
transformer:
|
|
187
|
-
reader:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
createSecurityGroupTemplateUrl: require('./securityGroup/configure/createSecurityGroup.html'),
|
|
191
|
-
createSecurityGroupController: 'awsCreateSecurityGroupCtrl',
|
|
192
|
-
},
|
|
193
|
-
subnet: {
|
|
194
|
-
renderer: 'awsSubnetRenderer',
|
|
195
|
-
},
|
|
196
|
-
search: {
|
|
197
|
-
resultFormatter: 'awsSearchResultFormatter',
|
|
198
|
-
},
|
|
199
|
-
applicationProviderFields: {
|
|
200
|
-
templateUrl: require('./applicationProviderFields/awsFields.html'),
|
|
148
|
+
transformer: AwsSecurityGroupTransformer,
|
|
149
|
+
reader: AwsSecurityGroupReader,
|
|
150
|
+
CreateSecurityGroupModal: AmazonSecurityGroupModal,
|
|
151
|
+
details: AmazonSecurityGroupDetails,
|
|
201
152
|
},
|
|
202
153
|
});
|
|
203
|
-
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function registerPipelineStageOnce(
|
|
157
|
+
stageKey: string,
|
|
158
|
+
registerStage: () => void,
|
|
159
|
+
cloudProvider: string | null = 'aws',
|
|
160
|
+
): void {
|
|
161
|
+
const isRegistered = Registry.pipeline.getStageTypes().some((stage) => {
|
|
162
|
+
const registeredStageKey = stage.provides || stage.key;
|
|
163
|
+
const cloudProviderMatches = cloudProvider === null || stage.cloudProvider === cloudProvider;
|
|
164
|
+
|
|
165
|
+
return registeredStageKey === stageKey && cloudProviderMatches;
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
if (!isRegistered) {
|
|
169
|
+
registerStage();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export function registerAmazonPipelineStages(): void {
|
|
174
|
+
registerPipelineStageOnce('bake', registerAwsBakeStage);
|
|
175
|
+
registerPipelineStageOnce('cloneServerGroup', registerAwsCloneServerGroupStage);
|
|
176
|
+
registerPipelineStageOnce('deployCloudFormation', registerDeployCloudFormationStackStage);
|
|
177
|
+
registerPipelineStageOnce('destroyServerGroup', registerAwsDestroyAsgStage);
|
|
178
|
+
registerPipelineStageOnce('disableServerGroup', registerAwsDisableAsgStage);
|
|
179
|
+
registerPipelineStageOnce('disableCluster', registerAwsDisableClusterStage);
|
|
180
|
+
registerPipelineStageOnce('enableServerGroup', registerAwsEnableAsgStage);
|
|
181
|
+
registerPipelineStageOnce('findImage', registerAwsFindAmiStage);
|
|
182
|
+
registerPipelineStageOnce('findImageFromTags', registerAwsFindImageFromTagsStage);
|
|
183
|
+
registerPipelineStageOnce('Aws.LambdaDeleteStage', registerLambdaDeleteStage, null);
|
|
184
|
+
registerPipelineStageOnce('Aws.LambdaDeploymentStage', registerLambdaDeployStage, null);
|
|
185
|
+
registerPipelineStageOnce('Aws.LambdaInvokeStage', registerLambdaInvokeStage, null);
|
|
186
|
+
registerPipelineStageOnce('modifyAwsScalingProcess', registerAwsModifyScalingProcessStage);
|
|
187
|
+
registerPipelineStageOnce('modifyWarmPool', registerAwsModifyWarmPoolStage);
|
|
188
|
+
registerPipelineStageOnce('resizeServerGroup', registerAwsResizeAsgStage);
|
|
189
|
+
registerPipelineStageOnce('rollbackCluster', registerAwsRollbackClusterStage);
|
|
190
|
+
registerPipelineStageOnce('Aws.LambdaUpdateCodeStage', registerLambdaUpdateStage, null);
|
|
191
|
+
registerPipelineStageOnce('Aws.LambdaTrafficRoutingStage', registerLambdaRouteStage, null);
|
|
192
|
+
registerPipelineStageOnce('scaleDownCluster', registerAwsScaleDownClusterStage);
|
|
193
|
+
registerPipelineStageOnce('shrinkCluster', registerAwsShrinkClusterStage);
|
|
194
|
+
registerPipelineStageOnce('upsertImageTags', registerAwsTagImageStage);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
registerAmazonProvider();
|
|
198
|
+
registerAmazonPipelineStages();
|
|
204
199
|
|
|
205
200
|
DeploymentStrategyRegistry.registerProvider('aws', [
|
|
206
201
|
'custom',
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FunctionReader } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
import { AwsFunctionTransformer } from './function';
|
|
4
|
+
import { AwsInstanceTypeService } from './instance/awsInstanceType.service';
|
|
5
|
+
import { AwsServerGroupTransformer } from './serverGroup/serverGroup.transformer';
|
|
6
|
+
|
|
7
|
+
let awsInstanceTypeService: AwsInstanceTypeService;
|
|
8
|
+
let awsServerGroupTransformer: AwsServerGroupTransformer;
|
|
9
|
+
let functionReader: FunctionReader;
|
|
10
|
+
|
|
11
|
+
export const AwsServices = {
|
|
12
|
+
get awsInstanceTypeService() {
|
|
13
|
+
return (awsInstanceTypeService = awsInstanceTypeService || new AwsInstanceTypeService());
|
|
14
|
+
},
|
|
15
|
+
get awsServerGroupTransformer() {
|
|
16
|
+
return (awsServerGroupTransformer = awsServerGroupTransformer || new AwsServerGroupTransformer());
|
|
17
|
+
},
|
|
18
|
+
get functionReader() {
|
|
19
|
+
return (functionReader = functionReader || new FunctionReader(new AwsFunctionTransformer()));
|
|
20
|
+
},
|
|
21
|
+
};
|
|
@@ -4,7 +4,7 @@ import { AccountService, CertificateReader } from '@spinnaker/core';
|
|
|
4
4
|
import type { IAmazonCertificate } from '../domain';
|
|
5
5
|
|
|
6
6
|
export class AmazonCertificateReader {
|
|
7
|
-
public static listCertificates():
|
|
7
|
+
public static listCertificates(): Promise<{ [accountId: string]: IAmazonCertificate[] }> {
|
|
8
8
|
return CertificateReader.listCertificatesByProvider('aws').then((certificates: IAmazonCertificate[]) => {
|
|
9
9
|
// This account grouping should really go into clouddriver but since it's not, put it here for now.
|
|
10
10
|
return AccountService.listAllAccounts('aws').then((allAccountDetails) => {
|
|
@@ -13,6 +13,14 @@ export interface IAmazonAsgTag {
|
|
|
13
13
|
resourceType: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
export interface IAmazonWarmPoolConfiguration {
|
|
17
|
+
minSize?: number;
|
|
18
|
+
maxGroupPreparedCapacity?: number;
|
|
19
|
+
poolState?: 'Stopped' | 'Running' | 'Hibernated';
|
|
20
|
+
instanceReusePolicy?: { reuseOnScaleIn?: boolean };
|
|
21
|
+
status?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
export interface IAmazonAsg extends IAsg {
|
|
17
25
|
availabilityZones: string[];
|
|
18
26
|
autoScalingGroupName: string;
|
|
@@ -26,6 +34,7 @@ export interface IAmazonAsg extends IAsg {
|
|
|
26
34
|
suspendedProcesses?: ISuspendedProcess[];
|
|
27
35
|
capacityRebalance?: boolean;
|
|
28
36
|
tags: IAmazonAsgTag[];
|
|
37
|
+
warmPoolConfiguration?: IAmazonWarmPoolConfiguration;
|
|
29
38
|
}
|
|
30
39
|
|
|
31
40
|
export interface IAmazonServerGroup extends IServerGroup {
|