@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.
Files changed (404) hide show
  1. package/dist/aws.module.d.ts +2 -1
  2. package/dist/aws.services.d.ts +8 -0
  3. package/dist/certificates/AmazonCertificateReader.d.ts +1 -1
  4. package/dist/domain/IAmazonServerGroup.d.ts +10 -0
  5. package/dist/function/CreateLambdaFunction.d.ts +10 -5
  6. package/dist/function/configure/Network.d.ts +3 -0
  7. package/dist/function/details/FunctionActions.d.ts +3 -0
  8. package/dist/function/function.transformer.d.ts +1 -0
  9. package/dist/image/image.reader.d.ts +2 -2
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +1 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/instance/amazon.instance.write.service.d.ts +5 -5
  14. package/dist/instance/awsInstanceType.service.d.ts +13 -2
  15. package/dist/instance/details/AmazonInstanceDetails.d.ts +67 -0
  16. package/dist/instance/index.d.ts +1 -0
  17. package/dist/keyPairs/KeyPairsReader.d.ts +1 -1
  18. package/dist/loadBalancer/AmazonLoadBalancersTag.d.ts +7 -4
  19. package/dist/loadBalancer/OidcConfigReader.d.ts +1 -1
  20. package/dist/loadBalancer/TargetGroupDetails.d.ts +37 -3
  21. package/dist/loadBalancer/amazonLoadBalancerDataUtils.d.ts +1 -1
  22. package/dist/loadBalancer/configure/AmazonLoadBalancerChoiceModal.d.ts +6 -2
  23. package/dist/loadBalancer/configure/LoadBalancerTypes.d.ts +4 -4
  24. package/dist/loadBalancer/configure/application/CreateApplicationLoadBalancer.d.ts +10 -5
  25. package/dist/loadBalancer/configure/classic/CreateClassicLoadBalancer.d.ts +12 -7
  26. package/dist/loadBalancer/configure/common/SecurityGroups.d.ts +4 -0
  27. package/dist/loadBalancer/configure/network/CreateNetworkLoadBalancer.d.ts +10 -5
  28. package/dist/loadBalancer/details/LoadBalancerActions.d.ts +9 -2
  29. package/dist/loadBalancer/details/amazonLoadBalancerDetails.d.ts +22 -0
  30. package/dist/loadBalancer/index.d.ts +1 -0
  31. package/dist/loadBalancer/loadBalancer.transformer.d.ts +1 -1
  32. package/dist/pipeline/stages/AmazonStageConfig.d.ts +11 -0
  33. package/dist/pipeline/stages/bake/AwsBakeStageConfig.d.ts +66 -0
  34. package/dist/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.d.ts +20 -0
  35. package/dist/pipeline/stages/deleteLambda/index.d.ts +1 -1
  36. package/dist/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.d.ts +5 -4
  37. package/dist/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.d.ts +3 -0
  38. package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.d.ts +1 -1
  39. package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.d.ts +1 -3
  40. package/dist/pipeline/stages/deployLambda/index.d.ts +1 -1
  41. package/dist/pipeline/stages/destroyAsg/awsDestroyAsgStage.d.ts +26 -2
  42. package/dist/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.d.ts +27 -0
  43. package/dist/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.d.ts +19 -0
  44. package/dist/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.d.ts +20 -0
  45. package/dist/pipeline/stages/findAmi/awsFindAmiStage.d.ts +17 -2
  46. package/dist/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.d.ts +3 -0
  47. package/dist/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.d.ts +12 -2
  48. package/dist/pipeline/stages/invokeLambda/index.d.ts +1 -1
  49. package/dist/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.d.ts +3 -0
  50. package/dist/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.d.ts +20 -2
  51. package/dist/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.d.ts +3 -0
  52. package/dist/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.d.ts +20 -0
  53. package/dist/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.d.ts +17 -0
  54. package/dist/pipeline/stages/resizeAsg/awsResizeAsgStage.d.ts +40 -2
  55. package/dist/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.d.ts +19 -0
  56. package/dist/pipeline/stages/routeLambda/index.d.ts +1 -1
  57. package/dist/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.d.ts +22 -0
  58. package/dist/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.d.ts +21 -0
  59. package/dist/pipeline/stages/tagImage/awsTagImageStage.d.ts +5 -2
  60. package/dist/pipeline/stages/updateCodeLambda/index.d.ts +1 -1
  61. package/dist/search/searchResultFormatter.d.ts +4 -2
  62. package/dist/securityGroup/configure/AmazonSecurityGroupModal.d.ts +43 -0
  63. package/dist/securityGroup/details/AmazonSecurityGroupDetails.d.ts +62 -0
  64. package/dist/securityGroup/details/index.d.ts +1 -0
  65. package/dist/securityGroup/index.d.ts +1 -0
  66. package/dist/securityGroup/securityGroup.reader.d.ts +0 -1
  67. package/dist/securityGroup/securityGroup.transformer.d.ts +11 -2
  68. package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +23 -7
  69. package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +17 -13
  70. package/dist/serverGroup/configure/wizard/AmazonCloneServerGroupModal.d.ts +16 -6
  71. package/dist/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.d.ts +6 -3
  72. package/dist/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.d.ts +3 -0
  73. package/dist/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.d.ts +4 -0
  74. package/dist/serverGroup/details/AmazonServerGroupActions.d.ts +10 -2
  75. package/dist/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.d.ts +17 -0
  76. package/dist/serverGroup/details/advancedSettings/index.d.ts +1 -0
  77. package/dist/serverGroup/details/resize/AmazonResizeServerGroupModal.d.ts +5 -3
  78. package/dist/serverGroup/details/rollback/AmazonRollbackServerGroupModal.d.ts +67 -0
  79. package/dist/serverGroup/details/rollback/index.d.ts +2 -0
  80. package/dist/serverGroup/details/rollback/rollbackServerGroupSelection.d.ts +9 -0
  81. package/dist/serverGroup/details/scalingPolicy/ScalingPolicyWriter.d.ts +2 -2
  82. package/dist/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.d.ts +0 -1
  83. package/dist/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.d.ts +24 -0
  84. package/dist/serverGroup/details/scalingProcesses/index.d.ts +2 -0
  85. package/dist/serverGroup/details/scheduledActions/EditScheduledActionsModal.d.ts +31 -0
  86. package/dist/serverGroup/details/scheduledActions/index.d.ts +1 -0
  87. package/dist/serverGroup/details/sections/AdvancedSettingsDetailsSection.d.ts +3 -0
  88. package/dist/serverGroup/details/sections/AmazonCapacityDetailsSection.d.ts +3 -0
  89. package/dist/serverGroup/details/sections/ScalingProcessesDetailsSection.d.ts +1 -1
  90. package/dist/serverGroup/details/sections/ScheduledActionsDetailsSection.d.ts +1 -1
  91. package/dist/serverGroup/details/sections/SecurityGroupsDetailsSection.d.ts +4 -1
  92. package/dist/serverGroup/details/sections/WarmPoolDetailsSection.d.ts +6 -0
  93. package/dist/serverGroup/details/sections/index.d.ts +1 -0
  94. package/dist/serverGroup/details/securityGroups/EditSecurityGroupsModal.d.ts +32 -0
  95. package/dist/serverGroup/details/securityGroups/index.d.ts +1 -0
  96. package/dist/serverGroup/details/warmPool/ModifyWarmPoolModal.d.ts +26 -0
  97. package/dist/serverGroup/details/warmPool/WarmPoolService.d.ts +6 -0
  98. package/dist/serverGroup/details/warmPool/index.d.ts +2 -0
  99. package/dist/serverGroup/serverGroup.transformer.d.ts +1 -2
  100. package/dist/vpc/VpcReader.d.ts +2 -2
  101. package/dist/vpc/index.d.ts +1 -0
  102. package/package.json +3 -12
  103. package/src/aws.module.spec.ts +296 -0
  104. package/src/aws.module.ts +107 -112
  105. package/src/aws.services.ts +21 -0
  106. package/src/certificates/AmazonCertificateReader.ts +1 -1
  107. package/src/domain/IAmazonServerGroup.ts +9 -0
  108. package/src/function/CreateLambdaFunction.tsx +29 -16
  109. package/src/function/configure/Network.tsx +8 -4
  110. package/src/function/details/AmazonFunctionDetails.tsx +4 -5
  111. package/src/function/details/FunctionActions.tsx +5 -1
  112. package/src/function/function.transformer.ts +4 -0
  113. package/src/image/image.reader.ts +3 -5
  114. package/src/index.ts +2 -2
  115. package/src/instance/amazon.instance.write.service.ts +15 -4
  116. package/src/instance/awsInstanceType.service.spec.js +172 -136
  117. package/src/instance/awsInstanceType.service.ts +142 -154
  118. package/src/instance/details/AmazonInstanceDetails.spec.tsx +79 -0
  119. package/src/instance/details/AmazonInstanceDetails.tsx +644 -0
  120. package/src/instance/details/InstanceInformation.tsx +11 -14
  121. package/src/instance/details/InstanceSecurityGroups.tsx +20 -23
  122. package/src/instance/details/InstanceTags.tsx +5 -3
  123. package/src/instance/index.ts +1 -0
  124. package/src/keyPairs/KeyPairsReader.ts +1 -1
  125. package/src/loadBalancer/AmazonLoadBalancersTag.spec.tsx +39 -0
  126. package/src/loadBalancer/AmazonLoadBalancersTag.tsx +21 -14
  127. package/src/loadBalancer/OidcConfigReader.ts +1 -1
  128. package/src/loadBalancer/TargetGroupDetails.spec.tsx +113 -0
  129. package/src/loadBalancer/TargetGroupDetails.tsx +287 -7
  130. package/src/loadBalancer/amazonLoadBalancerDataUtils.ts +21 -21
  131. package/src/loadBalancer/configure/AmazonLoadBalancerChoiceModal.tsx +17 -4
  132. package/src/loadBalancer/configure/LoadBalancerTypes.ts +7 -4
  133. package/src/loadBalancer/configure/application/ALBListeners.tsx +1 -2
  134. package/src/loadBalancer/configure/application/CreateApplicationLoadBalancer.tsx +28 -18
  135. package/src/loadBalancer/configure/classic/CreateClassicLoadBalancer.tsx +29 -19
  136. package/src/loadBalancer/configure/common/LoadBalancerLocation.tsx +1 -1
  137. package/src/loadBalancer/configure/common/SecurityGroups.spec.tsx +27 -0
  138. package/src/loadBalancer/configure/common/SecurityGroups.tsx +11 -5
  139. package/src/loadBalancer/configure/network/CreateNetworkLoadBalancer.tsx +28 -18
  140. package/src/loadBalancer/details/LoadBalancerActions.tsx +19 -5
  141. package/src/loadBalancer/details/amazonLoadBalancerDetails.spec.tsx +141 -0
  142. package/src/loadBalancer/details/amazonLoadBalancerDetails.tsx +599 -0
  143. package/src/loadBalancer/index.ts +1 -0
  144. package/src/loadBalancer/loadBalancer.transformer.ts +3 -4
  145. package/src/pipeline/stages/AmazonStageConfig.spec.tsx +103 -0
  146. package/src/pipeline/stages/AmazonStageConfig.tsx +259 -0
  147. package/src/pipeline/stages/bake/AwsBakeStageConfig.tsx +708 -0
  148. package/src/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.tsx +275 -0
  149. package/src/pipeline/stages/deleteLambda/index.ts +2 -6
  150. package/src/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.tsx +14 -33
  151. package/src/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.tsx +264 -0
  152. package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.spec.tsx +403 -0
  153. package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.ts +21 -29
  154. package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.ts +1 -11
  155. package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionApproval.tsx +4 -3
  156. package/src/pipeline/stages/deployLambda/components/NetworkForm.tsx +3 -6
  157. package/src/pipeline/stages/deployLambda/index.ts +2 -6
  158. package/src/pipeline/stages/destroyAsg/awsDestroyAsgStage.js +28 -65
  159. package/src/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.tsx +103 -0
  160. package/src/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.tsx +119 -0
  161. package/src/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.tsx +98 -0
  162. package/src/pipeline/stages/findAmi/awsFindAmiStage.js +22 -79
  163. package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.spec.tsx +122 -0
  164. package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.tsx +71 -0
  165. package/src/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.js +17 -32
  166. package/src/pipeline/stages/invokeLambda/index.ts +2 -6
  167. package/src/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.tsx +146 -0
  168. package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.js +27 -98
  169. package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.spec.tsx +167 -0
  170. package/src/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.tsx +157 -0
  171. package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.js +26 -0
  172. package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.spec.tsx +89 -0
  173. package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.spec.tsx +617 -0
  174. package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.tsx +340 -0
  175. package/src/pipeline/stages/resizeAsg/awsResizeAsgStage.js +34 -125
  176. package/src/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.tsx +129 -0
  177. package/src/pipeline/stages/routeLambda/index.ts +2 -6
  178. package/src/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.tsx +121 -0
  179. package/src/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.tsx +136 -0
  180. package/src/pipeline/stages/tagImage/awsTagImageStage.spec.tsx +167 -0
  181. package/src/pipeline/stages/tagImage/awsTagImageStage.tsx +94 -0
  182. package/src/pipeline/stages/updateCodeLambda/index.ts +2 -6
  183. package/src/routerConsumers.spec.tsx +207 -0
  184. package/src/search/searchResultFormatter.ts +9 -16
  185. package/src/securityGroup/configure/AmazonSecurityGroupModal.spec.tsx +170 -0
  186. package/src/securityGroup/configure/AmazonSecurityGroupModal.tsx +440 -0
  187. package/src/securityGroup/details/AmazonSecurityGroupDetails.spec.tsx +62 -0
  188. package/src/securityGroup/details/AmazonSecurityGroupDetails.tsx +444 -0
  189. package/src/securityGroup/details/IPRangeRules.tsx +1 -1
  190. package/src/securityGroup/details/index.ts +1 -0
  191. package/src/securityGroup/index.ts +1 -0
  192. package/src/securityGroup/securityGroup.reader.ts +0 -5
  193. package/src/securityGroup/securityGroup.transformer.ts +35 -0
  194. package/src/serverGroup/configure/AmazonImageSelectInput.spec.tsx +104 -80
  195. package/src/serverGroup/configure/AmazonImageSelectInput.tsx +37 -18
  196. package/src/serverGroup/configure/serverGroupCommandBuilder.aws.service.spec.js +28 -66
  197. package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +476 -465
  198. package/src/serverGroup/configure/serverGroupCommandBuilder.spec.js +76 -124
  199. package/src/serverGroup/configure/serverGroupConfiguration.service.ts +106 -103
  200. package/src/serverGroup/configure/wizard/AmazonCloneServerGroupModal.tsx +65 -25
  201. package/src/serverGroup/configure/wizard/instanceType/CpuCreditsToggle.tsx +3 -3
  202. package/src/serverGroup/configure/wizard/instanceType/advancedMode/AdvancedModeSelector.tsx +2 -2
  203. package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.spec.tsx +105 -0
  204. package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.tsx +20 -6
  205. package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.spec.tsx +39 -0
  206. package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +10 -9
  207. package/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx +2 -2
  208. package/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx +5 -2
  209. package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.spec.tsx +53 -0
  210. package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.tsx +35 -33
  211. package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.spec.tsx +20 -0
  212. package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.tsx +9 -4
  213. package/src/serverGroup/details/AmazonServerGroupActions.spec.tsx +186 -0
  214. package/src/serverGroup/details/AmazonServerGroupActions.tsx +37 -87
  215. package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.spec.tsx +110 -0
  216. package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.tsx +117 -0
  217. package/src/serverGroup/details/advancedSettings/index.ts +1 -0
  218. package/src/serverGroup/details/amazonServerGroupDetailsGetter.ts +4 -4
  219. package/src/serverGroup/details/resize/AmazonResizeServerGroupModal.tsx +16 -6
  220. package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.spec.tsx +285 -0
  221. package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.tsx +449 -0
  222. package/src/serverGroup/details/rollback/index.ts +2 -0
  223. package/src/serverGroup/details/rollback/rollbackServerGroupSelection.spec.ts +101 -0
  224. package/src/serverGroup/details/rollback/rollbackServerGroupSelection.ts +81 -0
  225. package/src/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.tsx +4 -4
  226. package/src/serverGroup/details/scalingPolicy/ScalingPolicyWriter.ts +2 -5
  227. package/src/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.tsx +0 -2
  228. package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.spec.tsx +74 -0
  229. package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.tsx +140 -0
  230. package/src/serverGroup/details/scalingProcesses/index.ts +2 -0
  231. package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.spec.tsx +115 -0
  232. package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.tsx +205 -0
  233. package/src/serverGroup/details/scheduledActions/index.ts +1 -0
  234. package/src/serverGroup/details/sections/AdvancedSettingsDetailsSection.tsx +7 -14
  235. package/src/serverGroup/details/sections/AmazonCapacityDetailsSection.tsx +14 -2
  236. package/src/serverGroup/details/sections/AmazonServerGroupMaintenanceActions.spec.tsx +148 -0
  237. package/src/serverGroup/details/sections/InstancesDistributionDetailsSection.spec.tsx +1 -5
  238. package/src/serverGroup/details/sections/LaunchTemplateDetailsSection.spec.tsx +1 -5
  239. package/src/serverGroup/details/sections/ScalingProcessesDetailsSection.tsx +8 -20
  240. package/src/serverGroup/details/sections/ScheduledActionsDetailsSection.tsx +7 -12
  241. package/src/serverGroup/details/sections/SecurityGroupsDetailsSection.tsx +14 -19
  242. package/src/serverGroup/details/sections/WarmPoolDetailsSection.tsx +44 -0
  243. package/src/serverGroup/details/sections/index.ts +1 -0
  244. package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.spec.tsx +161 -0
  245. package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.tsx +177 -0
  246. package/src/serverGroup/details/securityGroups/index.ts +1 -0
  247. package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.spec.tsx +69 -0
  248. package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.tsx +191 -0
  249. package/src/serverGroup/details/warmPool/WarmPoolService.spec.ts +30 -0
  250. package/src/serverGroup/details/warmPool/WarmPoolService.ts +15 -0
  251. package/src/serverGroup/details/warmPool/index.ts +2 -0
  252. package/src/serverGroup/serverGroup.transformer.ts +1 -6
  253. package/src/vpc/VpcReader.ts +2 -2
  254. package/src/vpc/index.ts +1 -0
  255. package/dist/common/common.module.d.ts +0 -1
  256. package/dist/common/footer.component.d.ts +0 -1
  257. package/dist/function/function.module.d.ts +0 -1
  258. package/dist/instance/details/amazonInstanceInformation.component.d.ts +0 -1
  259. package/dist/instance/details/instance.details.controller.d.ts +0 -2
  260. package/dist/instance/details/instanceDns.component.d.ts +0 -1
  261. package/dist/instance/details/instanceSecurityGroups.component.d.ts +0 -1
  262. package/dist/instance/details/instanceStatus.component.d.ts +0 -1
  263. package/dist/instance/details/instanceTags.component.d.ts +0 -1
  264. package/dist/loadBalancer/details/loadBalancerActions.component.d.ts +0 -1
  265. package/dist/loadBalancer/details/loadBalancerDetails.controller.d.ts +0 -41
  266. package/dist/loadBalancer/details/targetGroupDetails.controller.d.ts +0 -30
  267. package/dist/loadBalancer/loadBalancer.module.d.ts +0 -1
  268. package/dist/loadBalancer/targetGroup.states.d.ts +0 -1
  269. package/dist/pipeline/stages/bake/awsBakeStage.d.ts +0 -2
  270. package/dist/pipeline/stages/bake/bakeExecutionDetails.controller.d.ts +0 -2
  271. package/dist/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.d.ts +0 -2
  272. package/dist/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.d.ts +0 -1
  273. package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.d.ts +0 -25
  274. package/dist/pipeline/stages/disableAsg/awsDisableAsgStage.d.ts +0 -2
  275. package/dist/pipeline/stages/disableCluster/awsDisableClusterStage.d.ts +0 -2
  276. package/dist/pipeline/stages/enableAsg/awsEnableAsgStage.d.ts +0 -2
  277. package/dist/pipeline/stages/rollbackCluster/awsRollbackClusterStage.d.ts +0 -2
  278. package/dist/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.d.ts +0 -2
  279. package/dist/pipeline/stages/shrinkCluster/awsShrinkClusterStage.d.ts +0 -2
  280. package/dist/reactShims/aws.react.injector.d.ts +0 -18
  281. package/dist/reactShims/aws.react.module.d.ts +0 -1
  282. package/dist/reactShims/index.d.ts +0 -1
  283. package/dist/securityGroup/clone/cloneSecurityGroup.controller.d.ts +0 -2
  284. package/dist/securityGroup/configure/CreateSecurityGroupCtrl.d.ts +0 -2
  285. package/dist/securityGroup/configure/EditSecurityGroupCtrl.d.ts +0 -2
  286. package/dist/securityGroup/configure/configSecurityGroup.mixin.controller.d.ts +0 -2
  287. package/dist/securityGroup/configure/ingressRuleGroupSelector.component.d.ts +0 -1
  288. package/dist/securityGroup/configure/securityGroupDetailsCustom.component.d.ts +0 -1
  289. package/dist/securityGroup/configure/securityGroupDetailsCustom.d.ts +0 -10
  290. package/dist/securityGroup/details/securityGroupDetail.controller.d.ts +0 -2
  291. package/dist/securityGroup/details/securityGroupIpRangeRules.component.d.ts +0 -1
  292. package/dist/securityGroup/securityGroup.module.d.ts +0 -1
  293. package/dist/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.d.ts +0 -2
  294. package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +0 -2
  295. package/dist/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.d.ts +0 -1
  296. package/dist/serverGroup/details/scalingPolicy/scalingPolicy.module.d.ts +0 -1
  297. package/dist/serverGroup/details/scalingPolicy/scalingPolicySummary.component.d.ts +0 -1
  298. package/dist/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.d.ts +0 -2
  299. package/dist/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.d.ts +0 -2
  300. package/dist/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.d.ts +0 -2
  301. package/dist/serverGroup/details/serverGroupDetails.module.d.ts +0 -1
  302. package/dist/subnet/subnet.renderer.d.ts +0 -5
  303. package/dist/vpc/vpc.module.d.ts +0 -1
  304. package/src/applicationProviderFields/awsFields.html +0 -13
  305. package/src/common/common.module.ts +0 -6
  306. package/src/common/footer.component.ts +0 -29
  307. package/src/function/function.module.ts +0 -5
  308. package/src/image/image.reader.spec.ts +0 -75
  309. package/src/instance/details/amazonInstanceInformation.component.ts +0 -13
  310. package/src/instance/details/instance.details.controller.js +0 -586
  311. package/src/instance/details/instance.details.controller.spec.js +0 -133
  312. package/src/instance/details/instanceDetails.html +0 -65
  313. package/src/instance/details/instanceDns.component.ts +0 -21
  314. package/src/instance/details/instanceSecurityGroups.component.ts +0 -13
  315. package/src/instance/details/instanceStatus.component.ts +0 -19
  316. package/src/instance/details/instanceTags.component.ts +0 -13
  317. package/src/loadBalancer/details/loadBalancerActions.component.ts +0 -16
  318. package/src/loadBalancer/details/loadBalancerDetails.controller.spec.ts +0 -76
  319. package/src/loadBalancer/details/loadBalancerDetails.controller.ts +0 -240
  320. package/src/loadBalancer/details/loadBalancerDetails.html +0 -266
  321. package/src/loadBalancer/details/targetGroupDetails.controller.ts +0 -95
  322. package/src/loadBalancer/details/targetGroupDetails.html +0 -138
  323. package/src/loadBalancer/loadBalancer.module.ts +0 -15
  324. package/src/loadBalancer/targetGroup.states.ts +0 -55
  325. package/src/pipeline/stages/bake/awsBakeStage.js +0 -219
  326. package/src/pipeline/stages/bake/bakeExecutionDetails.controller.js +0 -43
  327. package/src/pipeline/stages/bake/bakeExecutionDetails.html +0 -65
  328. package/src/pipeline/stages/bake/bakeStage.html +0 -205
  329. package/src/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.js +0 -143
  330. package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStage.html +0 -143
  331. package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStepLabel.html +0 -1
  332. package/src/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.ts +0 -46
  333. package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.ts +0 -84
  334. package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.html +0 -84
  335. package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +0 -9
  336. package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +0 -1
  337. package/src/pipeline/stages/disableAsg/awsDisableAsgStage.js +0 -69
  338. package/src/pipeline/stages/disableAsg/disableAsgStage.html +0 -11
  339. package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +0 -1
  340. package/src/pipeline/stages/disableCluster/awsDisableClusterStage.js +0 -84
  341. package/src/pipeline/stages/disableCluster/disableClusterStage.html +0 -26
  342. package/src/pipeline/stages/enableAsg/awsEnableAsgStage.js +0 -73
  343. package/src/pipeline/stages/enableAsg/enableAsgStage.html +0 -11
  344. package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +0 -1
  345. package/src/pipeline/stages/findAmi/findAmiStage.html +0 -24
  346. package/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html +0 -44
  347. package/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html +0 -11
  348. package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessExecutionDetails.html +0 -36
  349. package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.html +0 -24
  350. package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +0 -90
  351. package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +0 -4
  352. package/src/pipeline/stages/rollbackCluster/awsRollbackClusterStage.js +0 -66
  353. package/src/pipeline/stages/rollbackCluster/rollbackClusterStage.html +0 -43
  354. package/src/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.js +0 -78
  355. package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +0 -35
  356. package/src/pipeline/stages/shrinkCluster/awsShrinkClusterStage.js +0 -73
  357. package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +0 -34
  358. package/src/pipeline/stages/tagImage/awsTagImageStage.js +0 -34
  359. package/src/pipeline/stages/tagImage/tagImageExecutionDetails.html +0 -38
  360. package/src/pipeline/stages/tagImage/tagImageStage.html +0 -10
  361. package/src/reactShims/aws.react.injector.ts +0 -25
  362. package/src/reactShims/aws.react.module.ts +0 -12
  363. package/src/reactShims/index.ts +0 -1
  364. package/src/securityGroup/clone/cloneSecurityGroup.controller.js +0 -106
  365. package/src/securityGroup/clone/cloneSecurityGroup.html +0 -19
  366. package/src/securityGroup/configure/CreateSecurityGroup.controller.spec.js +0 -307
  367. package/src/securityGroup/configure/CreateSecurityGroupCtrl.js +0 -47
  368. package/src/securityGroup/configure/EditSecurityGroupCtrl.js +0 -115
  369. package/src/securityGroup/configure/configSecurityGroup.mixin.controller.js +0 -366
  370. package/src/securityGroup/configure/createSecurityGroup.html +0 -19
  371. package/src/securityGroup/configure/createSecurityGroupIngress.html +0 -100
  372. package/src/securityGroup/configure/createSecurityGroupProperties.html +0 -123
  373. package/src/securityGroup/configure/editSecurityGroup.html +0 -20
  374. package/src/securityGroup/configure/ingressRuleGroupSelector.component.html +0 -77
  375. package/src/securityGroup/configure/ingressRuleGroupSelector.component.less +0 -6
  376. package/src/securityGroup/configure/ingressRuleGroupSelector.component.ts +0 -190
  377. package/src/securityGroup/configure/securityGroupDetailsCustom.component.ts +0 -16
  378. package/src/securityGroup/configure/securityGroupDetailsCustom.tsx +0 -16
  379. package/src/securityGroup/details/securityGroupDetail.controller.js +0 -249
  380. package/src/securityGroup/details/securityGroupDetail.html +0 -114
  381. package/src/securityGroup/details/securityGroupIpRangeRules.component.ts +0 -12
  382. package/src/securityGroup/securityGroup.module.ts +0 -26
  383. package/src/securityGroup/securityGroup.transformer.js +0 -48
  384. package/src/serverGroup/configure/serverGroupConfiguration.service.spec.ts +0 -478
  385. package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.js +0 -47
  386. package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.html +0 -79
  387. package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +0 -146
  388. package/src/serverGroup/details/rollback/rollbackServerGroup.html +0 -139
  389. package/src/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.ts +0 -15
  390. package/src/serverGroup/details/scalingPolicy/scalingPolicy.module.ts +0 -6
  391. package/src/serverGroup/details/scalingPolicy/scalingPolicySummary.component.ts +0 -14
  392. package/src/serverGroup/details/scalingPolicy/upsert/alarm/dimensionsEditor.less +0 -18
  393. package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.js +0 -95
  394. package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.spec.js +0 -106
  395. package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.html +0 -30
  396. package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.js +0 -70
  397. package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.html +0 -89
  398. package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.js +0 -95
  399. package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.html +0 -40
  400. package/src/serverGroup/details/serverGroupDetails.module.ts +0 -18
  401. package/src/serverGroup/serverGroup.transformer.spec.ts +0 -185
  402. package/src/subnet/SubnetSelectInput.spec.tsx +0 -91
  403. package/src/subnet/subnet.renderer.ts +0 -12
  404. package/src/vpc/vpc.module.ts +0 -9
@@ -0,0 +1,708 @@
1
+ import React from 'react';
2
+
3
+ import type { IExecutionDetailsSectionProps, IStage, IStageConfigProps } from '@spinnaker/core';
4
+ import {
5
+ AuthenticationService,
6
+ BakeExecutionLabel,
7
+ BakeryReader,
8
+ ChecklistInput,
9
+ ExecutionDetailsSection,
10
+ ExecutionDetailsTasks,
11
+ Markdown,
12
+ Registry,
13
+ SETTINGS,
14
+ Spinner,
15
+ StageConfigField,
16
+ StageFailureMessage,
17
+ } from '@spinnaker/core';
18
+
19
+ import { AWSProviderSettings } from '../../../aws.settings';
20
+
21
+ const storeTypes = ['ebs', 'docker'];
22
+
23
+ interface IBaseOsOption {
24
+ id: string;
25
+ detailedDescription?: string;
26
+ shortDescription?: string;
27
+ displayName?: string;
28
+ vmTypes?: string[];
29
+ }
30
+
31
+ interface IAwsBakeStageState {
32
+ baseLabelOptions: string[];
33
+ baseOsOptions: IBaseOsOption[];
34
+ extendedAttributeKey: string;
35
+ extendedAttributeValue: string;
36
+ loading: boolean;
37
+ loadError: boolean;
38
+ regions: string[];
39
+ roscoMode: boolean;
40
+ showAdvancedOptions: boolean;
41
+ vmTypes: string[];
42
+ }
43
+
44
+ function deleteEmptyProperties(stage: IStage): IStage {
45
+ return Object.keys(stage).reduce((acc, key) => {
46
+ if ((stage as any)[key] !== '') {
47
+ (acc as any)[key] = (stage as any)[key];
48
+ }
49
+ return acc;
50
+ }, {} as IStage);
51
+ }
52
+
53
+ function baseOsDescription(baseOsOption: IBaseOsOption): string {
54
+ const baseOsName = baseOsOption?.displayName || baseOsOption?.id || '';
55
+ return baseOsOption?.shortDescription ? `${baseOsName} (${baseOsOption.shortDescription})` : baseOsName;
56
+ }
57
+
58
+ function roscoMode(stage: any): boolean {
59
+ return (
60
+ SETTINGS.feature.roscoMode ||
61
+ (typeof SETTINGS.feature.roscoSelector === 'function' && SETTINGS.feature.roscoSelector(stage))
62
+ );
63
+ }
64
+
65
+ function showMigrationFields(pipeline: any): boolean {
66
+ return pipeline?.migrationStatus !== 'Started';
67
+ }
68
+
69
+ function showDockerPreview(stage: any): boolean {
70
+ return !!AWSProviderSettings.dockerBakeryDeprecated && stage.storeType === 'docker';
71
+ }
72
+
73
+ export class AwsBakeStageConfig extends React.Component<IStageConfigProps, IAwsBakeStageState> {
74
+ private mounted = false;
75
+
76
+ public state: IAwsBakeStageState = {
77
+ baseLabelOptions: [],
78
+ baseOsOptions: [],
79
+ extendedAttributeKey: '',
80
+ extendedAttributeValue: '',
81
+ loading: true,
82
+ loadError: false,
83
+ regions: [],
84
+ roscoMode: false,
85
+ showAdvancedOptions: false,
86
+ vmTypes: ['hvm', 'pv'],
87
+ };
88
+
89
+ public componentDidMount(): void {
90
+ this.mounted = true;
91
+ this.initialize();
92
+ }
93
+
94
+ public componentWillUnmount(): void {
95
+ this.mounted = false;
96
+ }
97
+
98
+ private initialize(): void {
99
+ const stage = this.props.stage;
100
+
101
+ Promise.all([
102
+ BakeryReader.getRegions('aws'),
103
+ BakeryReader.getBaseOsOptions('aws'),
104
+ BakeryReader.getBaseLabelOptions(),
105
+ ])
106
+ .then(([regions, baseOsOptions, baseLabelOptions]) => {
107
+ if (!this.mounted) {
108
+ return;
109
+ }
110
+
111
+ const baseOsOptionsList = baseOsOptions.baseImages || [];
112
+ const nextStage = this.applyDefaults(stage, regions as string[], baseOsOptionsList, baseLabelOptions);
113
+ this.replaceStage(nextStage);
114
+
115
+ this.setState({
116
+ baseLabelOptions,
117
+ baseOsOptions: baseOsOptionsList,
118
+ loading: false,
119
+ loadError: false,
120
+ regions: regions as string[],
121
+ roscoMode: roscoMode(nextStage),
122
+ showAdvancedOptions: this.showAdvanced(nextStage),
123
+ vmTypes: this.computeVmTypes(baseOsOptionsList, nextStage.baseOs),
124
+ });
125
+ })
126
+ .catch(() => {
127
+ if (this.mounted) {
128
+ this.setState({ loading: false, loadError: true });
129
+ }
130
+ });
131
+ }
132
+
133
+ private applyDefaults(
134
+ stage: IStage,
135
+ regions: string[],
136
+ baseOsOptions: IBaseOsOption[],
137
+ baseLabelOptions: string[],
138
+ ): IStage {
139
+ const nextStage: any = deleteEmptyProperties({ ...stage });
140
+ nextStage.extendedAttributes = nextStage.extendedAttributes || {};
141
+ nextStage.regions = (nextStage.regions && [...nextStage.regions].sort()) || [];
142
+
143
+ if (!nextStage.user) {
144
+ nextStage.user = AuthenticationService.getAuthenticatedUser()?.name;
145
+ }
146
+ if (!nextStage.storeType && storeTypes.length) {
147
+ nextStage.storeType = storeTypes[0];
148
+ }
149
+ if (regions.length === 1) {
150
+ nextStage.region = regions[0];
151
+ } else if (nextStage.region && !regions.includes(nextStage.region)) {
152
+ delete nextStage.region;
153
+ }
154
+ if (!nextStage.regions.length && this.props.application.defaultRegions.aws) {
155
+ nextStage.regions = [this.props.application.defaultRegions.aws];
156
+ }
157
+ let baseOsOptionsWithCustom = baseOsOptions;
158
+ if (!nextStage.baseOs && baseOsOptions.length) {
159
+ nextStage.baseOs = baseOsOptions[0].id;
160
+ } else if (nextStage.baseOs && !baseOsOptions.find((baseOs) => baseOs.id === nextStage.baseOs)) {
161
+ baseOsOptionsWithCustom = [
162
+ ...baseOsOptions,
163
+ { id: nextStage.baseOs, detailedDescription: 'Custom', vmTypes: ['hvm', 'pv'] },
164
+ ];
165
+ }
166
+ if (!nextStage.baseLabel && baseLabelOptions.length) {
167
+ nextStage.baseLabel = baseLabelOptions[0];
168
+ }
169
+ const vmTypes = this.computeVmTypes(baseOsOptionsWithCustom, nextStage.baseOs);
170
+ if (!nextStage.vmType && vmTypes.length) {
171
+ nextStage.vmType = vmTypes[0];
172
+ }
173
+
174
+ return nextStage;
175
+ }
176
+
177
+ private computeVmTypes(baseOsOptions: IBaseOsOption[], baseOs: string): string[] {
178
+ if (baseOsOptions.length && baseOsOptions.every((option) => option.vmTypes)) {
179
+ const match = baseOsOptions.find((option) => option.id === baseOs);
180
+ return match?.vmTypes || ['hvm', 'pv'];
181
+ }
182
+ return ['hvm', 'pv'];
183
+ }
184
+
185
+ private showAdvanced(stage: any): boolean {
186
+ return !!(
187
+ stage.templateFileName ||
188
+ (stage.extendedAttributes && Object.keys(stage.extendedAttributes).length > 0) ||
189
+ stage.varFileName ||
190
+ stage.baseName ||
191
+ stage.baseAmi ||
192
+ stage.amiName ||
193
+ stage.amiSuffix ||
194
+ stage.rootVolumeSize
195
+ );
196
+ }
197
+
198
+ private replaceStage(nextStage: IStage): void {
199
+ if (this.props.updateStage) {
200
+ this.props.updateStage(nextStage);
201
+ } else {
202
+ this.props.updateStageField(nextStage);
203
+ }
204
+ }
205
+
206
+ private updateStage(changes: any): void {
207
+ const nextStage: any = deleteEmptyProperties({ ...this.props.stage, ...changes });
208
+ this.replaceStage(nextStage);
209
+ this.setState({ roscoMode: roscoMode(nextStage) });
210
+
211
+ if (changes.baseOs !== undefined) {
212
+ const vmTypes = this.computeVmTypes(this.state.baseOsOptions, changes.baseOs);
213
+ this.setState({ vmTypes });
214
+ if (vmTypes.length && !vmTypes.includes(nextStage.vmType)) {
215
+ this.updateStage({ vmType: vmTypes[0] });
216
+ }
217
+ }
218
+ }
219
+
220
+ private updateExtendedAttribute(key: string, value: string): void {
221
+ this.updateStage({ extendedAttributes: { ...((this.props.stage as any).extendedAttributes || {}), [key]: value } });
222
+ }
223
+
224
+ private removeExtendedAttribute(key: string): void {
225
+ const extendedAttributes = { ...((this.props.stage as any).extendedAttributes || {}) };
226
+ delete extendedAttributes[key];
227
+ this.updateStage({ extendedAttributes });
228
+ }
229
+
230
+ private addExtendedAttribute(): void {
231
+ const key = this.state.extendedAttributeKey.trim();
232
+ if (!key) {
233
+ return;
234
+ }
235
+ this.updateExtendedAttribute(key, this.state.extendedAttributeValue);
236
+ this.setState({ extendedAttributeKey: '', extendedAttributeValue: '', showAdvancedOptions: true });
237
+ }
238
+
239
+ private renderDockerPreview(): React.ReactNode {
240
+ const stage = this.props.stage as any;
241
+ const showStoreTypeSelector = !this.state.roscoMode && showMigrationFields(this.props.pipeline);
242
+
243
+ return (
244
+ <>
245
+ {AWSProviderSettings.dockerBakeWarning && (
246
+ <div className="alert alert-warning sp-margin-s-top horizontal middle">
247
+ <i className="fa fa-exclamation-triangle" />
248
+ <div className="sp-margin-s-left">
249
+ <Markdown message={AWSProviderSettings.dockerBakeWarning} />
250
+ </div>
251
+ </div>
252
+ )}
253
+ <div className="alert alert-info horizontal middle">
254
+ <i className="fa fa-info-circle" />
255
+ <div className="sp-margin-s-left">
256
+ <Markdown message="To edit bake configuration or view advanced options, migrate to EBS store type." />
257
+ </div>
258
+ </div>
259
+ {showStoreTypeSelector && (
260
+ <StageConfigField label="Store Type">
261
+ {storeTypes.map((storeType) => (
262
+ <label className="radio-inline" key={storeType}>
263
+ <input
264
+ checked={stage.storeType === storeType}
265
+ name="storeType"
266
+ type="radio"
267
+ onChange={() => this.updateStage({ storeType })}
268
+ />
269
+ {storeType.toUpperCase()}
270
+ </label>
271
+ ))}
272
+ </StageConfigField>
273
+ )}
274
+ <StageConfigField label="Regions">
275
+ {(stage.regions || []).map((region: string) => (
276
+ <span className="sp-margin-xs-right" key={region}>
277
+ {region}
278
+ </span>
279
+ ))}
280
+ </StageConfigField>
281
+ <StageConfigField label="Skip Region Detection">{String(!!stage.skipRegionDetection)}</StageConfigField>
282
+ <StageConfigField label="Repo Path">{stage.package}</StageConfigField>
283
+ <StageConfigField label="Base OS">{stage.baseOs}</StageConfigField>
284
+ <StageConfigField label="VM Type">{stage.vmType}</StageConfigField>
285
+ <StageConfigField label="Store Type">{stage.storeType}</StageConfigField>
286
+ <StageConfigField label="Base Label">{stage.baseLabel}</StageConfigField>
287
+ </>
288
+ );
289
+ }
290
+
291
+ public render() {
292
+ if (this.state.loading) {
293
+ return <Spinner />;
294
+ }
295
+ if (this.state.loadError) {
296
+ return <div className="alert alert-danger">Unable to load bakery options.</div>;
297
+ }
298
+
299
+ const stage = this.props.stage as any;
300
+
301
+ if (showDockerPreview(stage)) {
302
+ return <div className="form-horizontal">{this.renderDockerPreview()}</div>;
303
+ }
304
+
305
+ const showMigration = showMigrationFields(this.props.pipeline);
306
+ const showVmTypeSelector = this.state.vmTypes.length > 1 && showMigration;
307
+ const showStoreType = !AWSProviderSettings.dockerBakeryDeprecated;
308
+ const showStoreTypeSelector = !this.state.roscoMode && showMigration && showStoreType;
309
+ const showRebake = this.state.roscoMode || stage.rebake;
310
+ const showAdvancedFields = this.state.showAdvancedOptions;
311
+ const extendedAttributes = stage.extendedAttributes || {};
312
+ const packageLabel = stage.storeType === 'docker' ? 'Repo Path' : 'Package';
313
+
314
+ return (
315
+ <div className="form-horizontal">
316
+ {AWSProviderSettings.bakeWarning && (
317
+ <div className="alert alert-warning sp-margin-s-top horizontal middle">
318
+ <i className="fa fa-exclamation-triangle" />
319
+ <div className="sp-margin-s-left">
320
+ <Markdown message={AWSProviderSettings.bakeWarning} />
321
+ </div>
322
+ </div>
323
+ )}
324
+ <StageConfigField label="Regions">
325
+ <ChecklistInput
326
+ inline={true}
327
+ name="regions"
328
+ onChange={(event: any) => this.updateStage({ regions: event.target.value })}
329
+ showSelectAll={true}
330
+ stringOptions={this.state.regions}
331
+ value={stage.regions || []}
332
+ />
333
+ </StageConfigField>
334
+ <StageConfigField label="Skip Region Detection" helpKey="pipeline.config.bake.skipRegionDetection">
335
+ <div className="checkbox" style={{ marginBottom: 0 }}>
336
+ <label>
337
+ <input
338
+ checked={!!stage.skipRegionDetection}
339
+ type="checkbox"
340
+ onChange={(event) => this.updateStage({ skipRegionDetection: event.target.checked })}
341
+ />
342
+ Only bake explicitly selected regions
343
+ </label>
344
+ </div>
345
+ </StageConfigField>
346
+ <StageConfigField label={packageLabel} helpKey="pipeline.config.bake.package">
347
+ <input
348
+ className="form-control input-sm"
349
+ value={stage.package || ''}
350
+ onChange={(event) => this.updateStage({ package: event.target.value })}
351
+ />
352
+ </StageConfigField>
353
+ <StageConfigField label="Base OS">
354
+ <select
355
+ className="form-control input-sm"
356
+ value={stage.baseOs || ''}
357
+ onChange={(event) => this.updateStage({ baseOs: event.target.value })}
358
+ >
359
+ {this.state.baseOsOptions.map((baseOsOption) => (
360
+ <option key={baseOsOption.id} value={baseOsOption.id}>
361
+ {baseOsDescription(baseOsOption)}
362
+ </option>
363
+ ))}
364
+ </select>
365
+ </StageConfigField>
366
+ {showVmTypeSelector && (
367
+ <StageConfigField label="VM Type">
368
+ {this.state.vmTypes.map((vmType) => (
369
+ <label className="radio-inline" key={vmType}>
370
+ <input
371
+ checked={stage.vmType === vmType}
372
+ name="vmType"
373
+ type="radio"
374
+ onChange={() => this.updateStage({ vmType })}
375
+ />
376
+ {vmType.toUpperCase()}
377
+ </label>
378
+ ))}
379
+ </StageConfigField>
380
+ )}
381
+ {showStoreTypeSelector && (
382
+ <StageConfigField label="Store Type">
383
+ {storeTypes.map((storeType) => (
384
+ <label className="radio-inline" key={storeType}>
385
+ <input
386
+ checked={stage.storeType === storeType}
387
+ name="storeType"
388
+ type="radio"
389
+ onChange={() => this.updateStage({ storeType })}
390
+ />
391
+ {storeType.toUpperCase()}
392
+ </label>
393
+ ))}
394
+ </StageConfigField>
395
+ )}
396
+ <StageConfigField label="Base Label">
397
+ {this.state.baseLabelOptions.map((baseLabel) => (
398
+ <label className="radio-inline" key={baseLabel}>
399
+ <input
400
+ checked={stage.baseLabel === baseLabel}
401
+ name="baseLabel"
402
+ type="radio"
403
+ onChange={() => this.updateStage({ baseLabel })}
404
+ />
405
+ {baseLabel}
406
+ </label>
407
+ ))}
408
+ </StageConfigField>
409
+ {showRebake && (
410
+ <StageConfigField label="Rebake">
411
+ <div className="checkbox" style={{ marginBottom: 0 }}>
412
+ <label>
413
+ <input
414
+ checked={!!stage.rebake}
415
+ type="checkbox"
416
+ onChange={(event) => this.updateStage({ rebake: event.target.checked })}
417
+ />
418
+ Rebake image without regard to the status of any existing bake
419
+ </label>
420
+ </div>
421
+ </StageConfigField>
422
+ )}
423
+ <div className="form-group">
424
+ <div className="col-md-9 col-md-offset-1">
425
+ <div className="checkbox">
426
+ <label>
427
+ <input
428
+ checked={this.state.showAdvancedOptions}
429
+ type="checkbox"
430
+ onChange={(event) => this.setState({ showAdvancedOptions: event.target.checked })}
431
+ />
432
+ <strong>Show Advanced Options</strong>
433
+ </label>
434
+ </div>
435
+ </div>
436
+ </div>
437
+ {showAdvancedFields && (
438
+ <>
439
+ {showMigration && (
440
+ <StageConfigField label="Template File Name" helpKey="pipeline.config.bake.templateFileName">
441
+ <input
442
+ className="form-control input-sm"
443
+ value={stage.templateFileName || ''}
444
+ onChange={(event) => this.updateStage({ templateFileName: event.target.value })}
445
+ />
446
+ </StageConfigField>
447
+ )}
448
+ <StageConfigField label="Extended Attributes" helpKey="pipeline.config.bake.extendedAttributes">
449
+ <table className="table table-condensed packed">
450
+ <thead>
451
+ <tr>
452
+ <th style={{ width: '40%' }}>Key</th>
453
+ <th style={{ width: '60%' }}>Value</th>
454
+ <th className="text-right">Actions</th>
455
+ </tr>
456
+ </thead>
457
+ <tbody>
458
+ {Object.keys(extendedAttributes).map((key) => (
459
+ <tr key={key}>
460
+ <td>
461
+ <strong className="small">{key}</strong>
462
+ </td>
463
+ <td>
464
+ <input
465
+ className="form-control input-sm"
466
+ value={extendedAttributes[key]}
467
+ onChange={(event) => this.updateExtendedAttribute(key, event.target.value)}
468
+ />
469
+ </td>
470
+ <td className="text-right">
471
+ <a
472
+ className="small"
473
+ href=""
474
+ onClick={(event) => {
475
+ event.preventDefault();
476
+ this.removeExtendedAttribute(key);
477
+ }}
478
+ >
479
+ Remove
480
+ </a>
481
+ </td>
482
+ </tr>
483
+ ))}
484
+ </tbody>
485
+ <tfoot>
486
+ <tr>
487
+ <td>
488
+ <input
489
+ className="form-control input-sm"
490
+ placeholder="Key"
491
+ value={this.state.extendedAttributeKey}
492
+ onChange={(event) => this.setState({ extendedAttributeKey: event.target.value })}
493
+ />
494
+ </td>
495
+ <td>
496
+ <input
497
+ className="form-control input-sm"
498
+ placeholder="Value"
499
+ value={this.state.extendedAttributeValue}
500
+ onChange={(event) => this.setState({ extendedAttributeValue: event.target.value })}
501
+ />
502
+ </td>
503
+ <td className="text-right">
504
+ <button
505
+ className="btn btn-block btn-sm add-new"
506
+ type="button"
507
+ onClick={() => this.addExtendedAttribute()}
508
+ >
509
+ <span className="glyphicon glyphicon-plus-sign" /> Add Extended Attribute
510
+ </button>
511
+ </td>
512
+ </tr>
513
+ </tfoot>
514
+ </table>
515
+ </StageConfigField>
516
+ {showMigration && (
517
+ <StageConfigField label="Var File Name" helpKey="pipeline.config.bake.varFileName">
518
+ <input
519
+ className="form-control input-sm"
520
+ value={stage.varFileName || ''}
521
+ onChange={(event) => this.updateStage({ varFileName: event.target.value })}
522
+ />
523
+ </StageConfigField>
524
+ )}
525
+ {!!AWSProviderSettings.minRootVolumeSize && showMigration && (
526
+ <StageConfigField label="Root Volume Size">
527
+ <input
528
+ type="number"
529
+ className="form-control input-sm"
530
+ style={{ width: 80, display: 'inline-block' }}
531
+ min={AWSProviderSettings.minRootVolumeSize}
532
+ value={stage.rootVolumeSize || ''}
533
+ onChange={(event) => this.updateStage({ rootVolumeSize: event.target.value })}
534
+ />{' '}
535
+ GB <span className="small">(minimum: {AWSProviderSettings.minRootVolumeSize})</span>
536
+ </StageConfigField>
537
+ )}
538
+ {stage.storeType !== 'docker' && showMigration && (
539
+ <StageConfigField label="Base Name">
540
+ <input
541
+ className="form-control input-sm"
542
+ value={stage.baseName || ''}
543
+ onChange={(event) => this.updateStage({ baseName: event.target.value })}
544
+ />
545
+ </StageConfigField>
546
+ )}
547
+ {stage.storeType !== 'docker' && showMigration && (
548
+ <StageConfigField label="Base AMI" helpKey="pipeline.config.bake.baseAmi">
549
+ <input
550
+ className="form-control input-sm"
551
+ value={stage.baseAmi || ''}
552
+ onChange={(event) => this.updateStage({ baseAmi: event.target.value })}
553
+ />
554
+ </StageConfigField>
555
+ )}
556
+ {showMigration && (
557
+ <StageConfigField
558
+ label={stage.storeType === 'docker' ? 'Docker Image Name' : 'AMI Name'}
559
+ helpKey="pipeline.config.bake.amiName"
560
+ >
561
+ <input
562
+ className="form-control input-sm"
563
+ value={stage.amiName || ''}
564
+ onChange={(event) => this.updateStage({ amiName: event.target.value })}
565
+ />
566
+ </StageConfigField>
567
+ )}
568
+ {showMigration && (
569
+ <StageConfigField
570
+ label={stage.storeType === 'docker' ? 'Docker Image Prefix' : 'AMI Suffix'}
571
+ helpKey="pipeline.config.bake.amiSuffix"
572
+ >
573
+ <input
574
+ className="form-control input-sm"
575
+ value={stage.amiSuffix || ''}
576
+ onChange={(event) => this.updateStage({ amiSuffix: event.target.value })}
577
+ />
578
+ </StageConfigField>
579
+ )}
580
+ </>
581
+ )}
582
+ </div>
583
+ );
584
+ }
585
+ }
586
+
587
+ export function AwsBakeExecutionDetails({ current, execution, name, stage }: IExecutionDetailsSectionProps) {
588
+ const context = (stage as any).context || {};
589
+ const isRoscoMode = roscoMode(context);
590
+ const showRebake = isRoscoMode || (execution as any)?.trigger?.rebake || context.rebake;
591
+ const bakeFailedNoError = context.status?.result === 'FAILURE' && !(stage as any).failureMessage;
592
+ const urlTemplate =
593
+ (isRoscoMode && SETTINGS.roscoDetailUrl ? SETTINGS.roscoDetailUrl : SETTINGS.bakeryDetailUrl) || '';
594
+ const bakeryDetailUrl = urlTemplate
595
+ .replace(/\{\{\s*context\.region\s*\}\}/g, context.region || '')
596
+ .replace(/\{\{\s*context\.status\.resourceId\s*\}\}/g, context.status?.resourceId || '');
597
+
598
+ return (
599
+ <ExecutionDetailsSection name={name} current={current}>
600
+ <div className="row">
601
+ <div className="col-md-6">
602
+ <dl className="dl-narrow dl-horizontal">
603
+ <dt>Image</dt>
604
+ <dd>{context.ami}</dd>
605
+ <dt>Region</dt>
606
+ <dd>{context.region}</dd>
607
+ <dt>Package</dt>
608
+ <dd>{context.package}</dd>
609
+ </dl>
610
+ </div>
611
+ <div className="col-md-6">
612
+ <dl className="dl-narrow dl-horizontal">
613
+ <dt>Base OS</dt>
614
+ <dd>{context.baseOs}</dd>
615
+ <dt>VM Type</dt>
616
+ <dd>{(context.vmType || '').toUpperCase()}</dd>
617
+ {!isRoscoMode && (
618
+ <>
619
+ <dt>Store Type</dt>
620
+ <dd>{(context.storeType || '').toUpperCase()}</dd>
621
+ <dt>Label</dt>
622
+ <dd>{context.baseLabel}</dd>
623
+ </>
624
+ )}
625
+ {showRebake && (
626
+ <>
627
+ <dt>Rebake</dt>
628
+ <dd>{String((execution as any)?.trigger?.rebake || context.rebake || false)}</dd>
629
+ </>
630
+ )}
631
+ {context.templateFileName && (
632
+ <>
633
+ <dt>Template</dt>
634
+ <dd>{context.templateFileName}</dd>
635
+ </>
636
+ )}
637
+ {context.varFileName && (
638
+ <>
639
+ <dt>Var File</dt>
640
+ <dd>{context.varFileName}</dd>
641
+ </>
642
+ )}
643
+ </dl>
644
+ </div>
645
+ </div>
646
+ <StageFailureMessage stage={stage as any} message={(stage as any).failureMessage} />
647
+ {context.region && context.status?.resourceId && (
648
+ <div className="row">
649
+ <div className="col-md-12">
650
+ <div className={`alert alert-${(stage as any).isFailed ? 'danger' : 'info'}`}>
651
+ {context.previouslyBaked && <div>No changes detected; reused existing bake</div>}
652
+ {context.imageName && (
653
+ <div>
654
+ <strong>Image:</strong>
655
+ <div>{context.imageName}</div>
656
+ <div>({context.ami})</div>
657
+ </div>
658
+ )}
659
+ {bakeFailedNoError && <span>Bake failed. </span>}
660
+ <a target="_blank" rel="noopener noreferrer" href={bakeryDetailUrl}>
661
+ View Bakery Details
662
+ </a>
663
+ {bakeFailedNoError && <span> for more info.</span>}
664
+ </div>
665
+ </div>
666
+ </div>
667
+ )}
668
+ </ExecutionDetailsSection>
669
+ );
670
+ }
671
+
672
+ (AwsBakeExecutionDetails as any).title = 'bakeConfig';
673
+
674
+ export const awsBakeStage = {
675
+ key: 'bake',
676
+ provides: 'bake',
677
+ cloudProvider: 'aws',
678
+ label: 'Bake',
679
+ description: 'Bakes an image',
680
+ component: AwsBakeStageConfig,
681
+ executionDetailsSections: [AwsBakeExecutionDetails as any, ExecutionDetailsTasks],
682
+ executionLabelComponent: BakeExecutionLabel,
683
+ extraLabelLines: (stage: any) => {
684
+ return stage.masterStage.context.allPreviouslyBaked || stage.masterStage.context.somePreviouslyBaked ? 1 : 0;
685
+ },
686
+ supportsCustomTimeout: true,
687
+ validators: [
688
+ { type: 'requiredField', fieldName: 'package' },
689
+ { type: 'requiredField', fieldName: 'regions' },
690
+ {
691
+ type: 'upstreamVersionProvided',
692
+ checkParentTriggers: true,
693
+ getMessage: (labels: string[]) =>
694
+ 'Bake stages should always have a stage or trigger preceding them that provides version information: ' +
695
+ '<ul>' +
696
+ labels.map((label) => `<li>${label}</li>`).join('') +
697
+ '</ul>' +
698
+ 'Otherwise, Spinnaker will bake and deploy the most-recently built package.',
699
+ },
700
+ ],
701
+ restartable: true,
702
+ };
703
+
704
+ export function registerAwsBakeStage() {
705
+ Registry.pipeline.registerStage(awsBakeStage);
706
+ }
707
+
708
+ registerAwsBakeStage();