@spinnaker/cloudfoundry 0.0.0-main-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1085 -0
- package/LICENSE.txt +203 -0
- package/dist/cf.module.d.ts +24 -0
- package/dist/cf.settings.d.ts +7 -0
- package/dist/common/applicationName.validator.d.ts +1 -0
- package/dist/deploymentStrategy/CloudFoundryDeploymentStrategySelector.d.ts +21 -0
- package/dist/deploymentStrategy/strategies/redblack/redblack.strategy.d.ts +10 -0
- package/dist/deploymentStrategy/strategies/rollingredblack/AdditionalFields.d.ts +22 -0
- package/dist/domain/ICloudFoundryAccount.d.ts +7 -0
- package/dist/domain/ICloudFoundryApplication.d.ts +4 -0
- package/dist/domain/ICloudFoundryCluster.d.ts +5 -0
- package/dist/domain/ICloudFoundryDroplet.d.ts +19 -0
- package/dist/domain/ICloudFoundryInstance.d.ts +4 -0
- package/dist/domain/ICloudFoundryLoadBalancer.d.ts +25 -0
- package/dist/domain/ICloudFoundryServerGroup.d.ts +41 -0
- package/dist/domain/ICloudFoundrySpace.d.ts +9 -0
- package/dist/domain/index.d.ts +8 -0
- package/dist/help/cloudfoundry.help.d.ts +1 -0
- package/dist/image/image.reader.cf.d.ts +4 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5929 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/details/CloudFoundryInstanceActions.d.ts +11 -0
- package/dist/instance/details/CloudFoundryInstanceDetails.d.ts +23 -0
- package/dist/instance/details/index.d.ts +1 -0
- package/dist/instance/details/sections/CloudFoundryInstanceDetailsSection.d.ts +9 -0
- package/dist/instance/details/sections/index.d.ts +1 -0
- package/dist/loadBalancer/configure/CloudFoundryMapLoadBalancerModal.d.ts +33 -0
- package/dist/loadBalancer/configure/loadBalancerDetails.d.ts +32 -0
- package/dist/loadBalancer/details/CloudFoundryLoadBalancerActions.d.ts +10 -0
- package/dist/loadBalancer/details/CloudFoundryLoadBalancerDetails.d.ts +26 -0
- package/dist/loadBalancer/details/index.d.ts +1 -0
- package/dist/loadBalancer/details/sections/CloudFoundryLoadBalancerDetailsSection.d.ts +9 -0
- package/dist/loadBalancer/details/sections/CloudFoundryLoadBalancerLinksSection.d.ts +9 -0
- package/dist/loadBalancer/details/sections/CloudFoundryLoadBalancerStatusSection.d.ts +9 -0
- package/dist/loadBalancer/details/sections/index.d.ts +3 -0
- package/dist/loadBalancer/index.d.ts +3 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +25 -0
- package/dist/pipeline/config/validation/cfTargetImpedance.validator.d.ts +9 -0
- package/dist/pipeline/config/validation/instanceSize.validator.d.ts +15 -0
- package/dist/pipeline/config/validation/requiredRoutes.validator.d.ts +4 -0
- package/dist/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestConfig.d.ts +7 -0
- package/dist/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestConfigForm.d.ts +13 -0
- package/dist/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestDetailsTab.d.ts +6 -0
- package/dist/pipeline/stages/bakeCloudFoundryManifest/bakeCloudFoundryManifestStage.d.ts +1 -0
- package/dist/pipeline/stages/cloneServerGroup/CloudFoundryCloneServerGroupStageConfig.d.ts +11 -0
- package/dist/pipeline/stages/cloneServerGroup/cloudFoundryCloneServerGroupStage.module.d.ts +1 -0
- package/dist/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsConfig.d.ts +9 -0
- package/dist/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsStageConfigForm.d.ts +26 -0
- package/dist/pipeline/stages/createServiceBindings/cloudFoundryCreateServiceBindingsStage.d.ts +1 -0
- package/dist/pipeline/stages/createServiceKey/CloudFoundryCreateServiceKeyStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/createServiceKey/cloudFoundryCreateServiceKeyStage.module.d.ts +1 -0
- package/dist/pipeline/stages/deleteServiceBindings/CloudFoundryDeleteServiceBindingsConfig.d.ts +10 -0
- package/dist/pipeline/stages/deleteServiceBindings/CloudFoundryDeleteServiceBindingsStageConfigForm.d.ts +20 -0
- package/dist/pipeline/stages/deleteServiceBindings/cloudFoundryDeleteServiceBindingsStage.d.ts +1 -0
- package/dist/pipeline/stages/deleteServiceKey/CloudFoundryDeleteServiceKeyStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/deleteServiceKey/cloudFoundryDeleteServiceKeyStage.module.d.ts +1 -0
- package/dist/pipeline/stages/deployService/CloudFoundryDeployServiceStageConfig.d.ts +24 -0
- package/dist/pipeline/stages/deployService/CreateServiceInstanceDirectInput.d.ts +29 -0
- package/dist/pipeline/stages/deployService/CreateUserProvidedInput.d.ts +19 -0
- package/dist/pipeline/stages/deployService/ICloudFoundryServiceManifestSource.d.ts +24 -0
- package/dist/pipeline/stages/deployService/ServiceTagsInput.d.ts +17 -0
- package/dist/pipeline/stages/deployService/cloudFoundryDeployServiceStage.module.d.ts +1 -0
- package/dist/pipeline/stages/destroyAsg/cloudFoundryDestroyAsgStage.module.d.ts +1 -0
- package/dist/pipeline/stages/destroyService/CloudFoundryDestroyServiceStageConfig.d.ts +5 -0
- package/dist/pipeline/stages/destroyService/CloudFoundryDestroyServiceStageConfigForm.d.ts +19 -0
- package/dist/pipeline/stages/destroyService/cloudFoundryDestroyServiceStage.module.d.ts +1 -0
- package/dist/pipeline/stages/disableAsg/cloudFoundryDisableAsgStage.module.d.ts +1 -0
- package/dist/pipeline/stages/enableAsg/cloudFoundryEnableAsgStage.module.d.ts +1 -0
- package/dist/pipeline/stages/mapLoadBalancers/cloudFoundryMapLoadBalancersStage.module.d.ts +1 -0
- package/dist/pipeline/stages/resizeAsg/CloudFoundryResizeAsgStageConfig.d.ts +17 -0
- package/dist/pipeline/stages/resizeAsg/cloudFoundryResizeAsgStage.module.d.ts +1 -0
- package/dist/pipeline/stages/rollbackCluster/CloudFoundryRollbackClusterStageConfig.d.ts +17 -0
- package/dist/pipeline/stages/rollbackCluster/cloudFoundryRollbackClusterStage.module.d.ts +1 -0
- package/dist/pipeline/stages/runJob/CloudFoundryRunJobStageConfig.d.ts +14 -0
- package/dist/pipeline/stages/runJob/RunJobExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/runJob/cloudFoundryRunJob.module.d.ts +1 -0
- package/dist/pipeline/stages/shareService/CloudFoundryShareServiceExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/shareService/CloudFoundryShareServiceStageConfig.d.ts +21 -0
- package/dist/pipeline/stages/shareService/cloudFoundryShareServiceStage.module.d.ts +1 -0
- package/dist/pipeline/stages/unmapLoadBalancers/cloudFoundryUnmapLoadBalancersStage.module.d.ts +1 -0
- package/dist/pipeline/stages/unshareService/CloudFoundryUnshareServiceExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/unshareService/CloudFoundryUnshareServiceStageConfig.d.ts +18 -0
- package/dist/pipeline/stages/unshareService/cloudFoundryUnshareServiceStage.module.d.ts +1 -0
- package/dist/presentation/forms/index.d.ts +2 -0
- package/dist/presentation/forms/inputs/FormikConfigField.d.ts +10 -0
- package/dist/presentation/forms/inputs/index.d.ts +1 -0
- package/dist/presentation/forms/serverGroup/Buildpacks.d.ts +8 -0
- package/dist/presentation/forms/serverGroup/EnvironmentVariables.d.ts +8 -0
- package/dist/presentation/forms/serverGroup/HealthCheck.d.ts +12 -0
- package/dist/presentation/forms/serverGroup/InstanceParameters.d.ts +12 -0
- package/dist/presentation/forms/serverGroup/Routes.d.ts +10 -0
- package/dist/presentation/forms/serverGroup/Services.d.ts +5 -0
- package/dist/presentation/forms/serverGroup/index.d.ts +6 -0
- package/dist/presentation/index.d.ts +3 -0
- package/dist/presentation/pipeline/index.d.ts +1 -0
- package/dist/presentation/pipeline/stages/CloudFoundryAsgStageConfig.d.ts +14 -0
- package/dist/presentation/pipeline/stages/CloudFoundryLoadBalancersExecutionDetails.d.ts +6 -0
- package/dist/presentation/pipeline/stages/CloudFoundryLoadBalancersStageConfig.d.ts +25 -0
- package/dist/presentation/pipeline/stages/CloudFoundryServiceExecutionDetails.d.ts +6 -0
- package/dist/presentation/pipeline/stages/CloudFoundryServiceKeyExecutionDetails.d.ts +6 -0
- package/dist/presentation/pipeline/stages/index.d.ts +5 -0
- package/dist/presentation/widgets/accountRegionClusterSelector/AccountRegionClusterSelector.d.ts +33 -0
- package/dist/presentation/widgets/accountRegionClusterSelector/FormikAccountRegionClusterSelector.d.ts +32 -0
- package/dist/presentation/widgets/accountRegionClusterSelector/index.d.ts +2 -0
- package/dist/presentation/widgets/index.d.ts +1 -0
- package/dist/presentation/widgets/recentLogs/CloudFoundryRecentLogs.d.ts +27 -0
- package/dist/routeDomains/index.d.ts +1 -0
- package/dist/routeDomains/routeDomainSelectField.d.ts +15 -0
- package/dist/serverGroup/configure/index.d.ts +4 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.cf.d.ts +12 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilderShim.service.cf.d.ts +14 -0
- package/dist/serverGroup/configure/serverGroupConfigurationModel.cf.d.ts +65 -0
- package/dist/serverGroup/configure/wizard/CreateServerGroupModal.d.ts +31 -0
- package/dist/serverGroup/configure/wizard/ServerGroupTemplateSelection.d.ts +16 -0
- package/dist/serverGroup/configure/wizard/sections/artifactSettings/ArtifactSettings.cf.d.ts +17 -0
- package/dist/serverGroup/configure/wizard/sections/artifactSettings/ConstantArtifactSettings.cf.d.ts +11 -0
- package/dist/serverGroup/configure/wizard/sections/basicSettings/BasicSettings.cf.d.ts +24 -0
- package/dist/serverGroup/configure/wizard/sections/cloneSettings/CloneSettings.cf.d.ts +21 -0
- package/dist/serverGroup/configure/wizard/sections/configurationSettings/ConfigurationSettings.cf.d.ts +22 -0
- package/dist/serverGroup/details/cfServerGroupDetailsGetter.d.ts +4 -0
- package/dist/serverGroup/details/cloudFoundryServerGroupActions.d.ts +24 -0
- package/dist/serverGroup/details/mapLoadBalancers/CloudFoundryMapLoadBalancersModal.d.ts +28 -0
- package/dist/serverGroup/details/mapLoadBalancers/CloudFoundryUnmapLoadBalancersModal.d.ts +28 -0
- package/dist/serverGroup/details/resize/CloudFoundryResizeServerGroupModal.d.ts +37 -0
- package/dist/serverGroup/details/rollback/CloudFoundryRollbackServerGroupModal.d.ts +36 -0
- package/dist/serverGroup/details/sections/ApplicationManagerSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/BoundServicesSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/BuildSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/EnvironmentVariablesSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/HealthCheckSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/ICloudFoundryServerGroupDetailsSectionProps.d.ts +5 -0
- package/dist/serverGroup/details/sections/MetricsSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/PackageSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/ServerGroupInformationSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/ServerGroupSizingSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/index.d.ts +9 -0
- package/dist/serverGroup/index.d.ts +5 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +10 -0
- package/package.json +52 -0
- package/src/cf.module.ts +85 -0
- package/src/cf.settings.ts +14 -0
- package/src/common/applicationName.validator.ts +43 -0
- package/src/common/cloudFoundry.less +16 -0
- package/src/deploymentStrategy/CloudFoundryDeploymentStrategySelector.tsx +175 -0
- package/src/deploymentStrategy/strategies/redblack/redblack.strategy.ts +11 -0
- package/src/deploymentStrategy/strategies/rollingredblack/AdditionalFields.tsx +161 -0
- package/src/domain/ICloudFoundryAccount.ts +9 -0
- package/src/domain/ICloudFoundryApplication.ts +5 -0
- package/src/domain/ICloudFoundryCluster.ts +6 -0
- package/src/domain/ICloudFoundryDroplet.ts +22 -0
- package/src/domain/ICloudFoundryInstance.ts +5 -0
- package/src/domain/ICloudFoundryLoadBalancer.ts +29 -0
- package/src/domain/ICloudFoundryServerGroup.ts +47 -0
- package/src/domain/ICloudFoundrySpace.ts +10 -0
- package/src/domain/index.ts +8 -0
- package/src/help/cloudfoundry.help.ts +31 -0
- package/src/image/image.reader.cf.ts +17 -0
- package/src/index.ts +7 -0
- package/src/instance/details/CloudFoundryInstanceActions.tsx +59 -0
- package/src/instance/details/CloudFoundryInstanceDetails.tsx +154 -0
- package/src/instance/details/index.ts +1 -0
- package/src/instance/details/sections/CloudFoundryInstanceDetailsSection.tsx +49 -0
- package/src/instance/details/sections/index.ts +1 -0
- package/src/loadBalancer/configure/CloudFoundryMapLoadBalancerModal.tsx +210 -0
- package/src/loadBalancer/configure/loadBalancerDetails.tsx +228 -0
- package/src/loadBalancer/details/CloudFoundryLoadBalancerActions.tsx +61 -0
- package/src/loadBalancer/details/CloudFoundryLoadBalancerDetails.tsx +148 -0
- package/src/loadBalancer/details/index.ts +1 -0
- package/src/loadBalancer/details/sections/CloudFoundryLoadBalancerDetailsSection.tsx +63 -0
- package/src/loadBalancer/details/sections/CloudFoundryLoadBalancerLinksSection.tsx +34 -0
- package/src/loadBalancer/details/sections/CloudFoundryLoadBalancerStatusSection.tsx +27 -0
- package/src/loadBalancer/details/sections/index.ts +3 -0
- package/src/loadBalancer/index.ts +3 -0
- package/src/loadBalancer/loadBalancer.transformer.ts +144 -0
- package/src/logo/cf.icon.svg +12 -0
- package/src/logo/cf.logo.less +5 -0
- package/src/logo/cf.logo.svg +12 -0
- package/src/pipeline/config/validation/cfTargetImpedance.validator.ts +60 -0
- package/src/pipeline/config/validation/instanceSize.validator.ts +66 -0
- package/src/pipeline/config/validation/requiredRoutes.validator.ts +26 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestConfig.tsx +62 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestConfigForm.tsx +174 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestDetailsTab.tsx +35 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/bakeCloudFoundryManifestConfig.spec.tsx +80 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/bakeCloudFoundryManifestStage.ts +35 -0
- package/src/pipeline/stages/cloneServerGroup/CloudFoundryCloneServerGroupStageConfig.tsx +113 -0
- package/src/pipeline/stages/cloneServerGroup/cloudFoundryCloneServerGroupStage.module.ts +14 -0
- package/src/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsConfig.spec.tsx +35 -0
- package/src/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsConfig.tsx +69 -0
- package/src/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsStageConfigForm.tsx +230 -0
- package/src/pipeline/stages/createServiceBindings/cloudFoundryCreateServiceBindingsStage.ts +19 -0
- package/src/pipeline/stages/createServiceBindings/cloudFoundryCreateServiceBindingsStageForm.spec.tsx +50 -0
- package/src/pipeline/stages/createServiceKey/CloudFoundryCreateServiceKeyStageConfig.tsx +116 -0
- package/src/pipeline/stages/createServiceKey/cloudFoundryCreateServiceKeyStage.module.ts +21 -0
- package/src/pipeline/stages/deleteServiceBindings/CloudFoundryDeleteServiceBindingsConfig.tsx +69 -0
- package/src/pipeline/stages/deleteServiceBindings/CloudFoundryDeleteServiceBindingsStageConfigForm.tsx +158 -0
- package/src/pipeline/stages/deleteServiceBindings/cloudFoundryDeleteServiceBindingsStage.ts +19 -0
- package/src/pipeline/stages/deleteServiceBindings/cloudFoundryDeleteServiceBindingsStageForm.spec.tsx +49 -0
- package/src/pipeline/stages/deleteServiceKey/CloudFoundryDeleteServiceKeyStageConfig.tsx +116 -0
- package/src/pipeline/stages/deleteServiceKey/cloudFoundryDeleteServiceKeyStage.module.ts +22 -0
- package/src/pipeline/stages/deployService/CloudFoundryDeployServiceStageConfig.tsx +198 -0
- package/src/pipeline/stages/deployService/CreateServiceInstanceDirectInput.tsx +164 -0
- package/src/pipeline/stages/deployService/CreateUserProvidedInput.tsx +116 -0
- package/src/pipeline/stages/deployService/ICloudFoundryServiceManifestSource.ts +27 -0
- package/src/pipeline/stages/deployService/ServiceTagsInput.tsx +89 -0
- package/src/pipeline/stages/deployService/cloudFoundryDeployServiceStage.module.ts +153 -0
- package/src/pipeline/stages/deployService/cloudfoundryDeployServiceStage.less +12 -0
- package/src/pipeline/stages/destroyAsg/cloudFoundryDestroyAsgStage.module.ts +23 -0
- package/src/pipeline/stages/destroyService/CloudFoundryDestroyServiceStageConfig.tsx +46 -0
- package/src/pipeline/stages/destroyService/CloudFoundryDestroyServiceStageConfigForm.tsx +134 -0
- package/src/pipeline/stages/destroyService/cloudFoundryDestroyServiceStage.module.ts +20 -0
- package/src/pipeline/stages/disableAsg/cloudFoundryDisableAsgStage.module.ts +18 -0
- package/src/pipeline/stages/enableAsg/cloudFoundryEnableAsgStage.module.ts +18 -0
- package/src/pipeline/stages/mapLoadBalancers/cloudFoundryMapLoadBalancersStage.module.ts +21 -0
- package/src/pipeline/stages/resizeAsg/CloudFoundryResizeAsgStageConfig.tsx +148 -0
- package/src/pipeline/stages/resizeAsg/cloudFoundryResizeAsgStage.module.ts +52 -0
- package/src/pipeline/stages/rollbackCluster/CloudFoundryRollbackClusterStageConfig.tsx +90 -0
- package/src/pipeline/stages/rollbackCluster/cloudFoundryRollbackClusterStage.module.ts +19 -0
- package/src/pipeline/stages/runJob/CloudFoundryRunJobStageConfig.tsx +100 -0
- package/src/pipeline/stages/runJob/RunJobExecutionDetails.tsx +62 -0
- package/src/pipeline/stages/runJob/cloudFoundryRunJob.module.ts +24 -0
- package/src/pipeline/stages/shareService/CloudFoundryShareServiceExecutionDetails.tsx +52 -0
- package/src/pipeline/stages/shareService/CloudFoundryShareServiceStageConfig.tsx +141 -0
- package/src/pipeline/stages/shareService/cloudFoundryShareServiceStage.module.ts +21 -0
- package/src/pipeline/stages/unmapLoadBalancers/cloudFoundryUnmapLoadBalancersStage.module.ts +21 -0
- package/src/pipeline/stages/unshareService/CloudFoundryUnshareServiceExecutionDetails.tsx +46 -0
- package/src/pipeline/stages/unshareService/CloudFoundryUnshareServiceStageConfig.tsx +114 -0
- package/src/pipeline/stages/unshareService/cloudFoundryUnshareServiceStage.module.ts +21 -0
- package/src/presentation/forms/index.ts +2 -0
- package/src/presentation/forms/inputs/FormikConfigField.tsx +28 -0
- package/src/presentation/forms/inputs/index.ts +1 -0
- package/src/presentation/forms/serverGroup/Buildpacks.tsx +69 -0
- package/src/presentation/forms/serverGroup/EnvironmentVariables.tsx +94 -0
- package/src/presentation/forms/serverGroup/HealthCheck.tsx +57 -0
- package/src/presentation/forms/serverGroup/InstanceParameters.tsx +63 -0
- package/src/presentation/forms/serverGroup/Routes.tsx +74 -0
- package/src/presentation/forms/serverGroup/Services.tsx +62 -0
- package/src/presentation/forms/serverGroup/index.ts +6 -0
- package/src/presentation/index.ts +3 -0
- package/src/presentation/pipeline/index.ts +1 -0
- package/src/presentation/pipeline/stages/CloudFoundryAsgStageConfig.tsx +67 -0
- package/src/presentation/pipeline/stages/CloudFoundryLoadBalancersExecutionDetails.tsx +53 -0
- package/src/presentation/pipeline/stages/CloudFoundryLoadBalancersStageConfig.tsx +116 -0
- package/src/presentation/pipeline/stages/CloudFoundryServiceExecutionDetails.tsx +46 -0
- package/src/presentation/pipeline/stages/CloudFoundryServiceKeyExecutionDetails.tsx +52 -0
- package/src/presentation/pipeline/stages/index.ts +5 -0
- package/src/presentation/widgets/accountRegionClusterSelector/AccountRegionClusterSelector.spec.tsx +385 -0
- package/src/presentation/widgets/accountRegionClusterSelector/AccountRegionClusterSelector.tsx +231 -0
- package/src/presentation/widgets/accountRegionClusterSelector/FormikAccountRegionClusterSelector.tsx +164 -0
- package/src/presentation/widgets/accountRegionClusterSelector/index.ts +2 -0
- package/src/presentation/widgets/index.ts +1 -0
- package/src/presentation/widgets/recentLogs/CloudFoundryRecentLogs.tsx +112 -0
- package/src/routeDomains/index.ts +1 -0
- package/src/routeDomains/routeDomainSelectField.tsx +48 -0
- package/src/serverGroup/configure/index.ts +4 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.cf.ts +168 -0
- package/src/serverGroup/configure/serverGroupCommandBuilderShim.service.cf.ts +64 -0
- package/src/serverGroup/configure/serverGroupConfigurationModel.cf.ts +77 -0
- package/src/serverGroup/configure/wizard/CreateServerGroupModal.tsx +194 -0
- package/src/serverGroup/configure/wizard/ServerGroupTemplateSelection.tsx +55 -0
- package/src/serverGroup/configure/wizard/sections/artifactSettings/ArtifactSettings.cf.tsx +78 -0
- package/src/serverGroup/configure/wizard/sections/artifactSettings/ConstantArtifactSettings.cf.tsx +49 -0
- package/src/serverGroup/configure/wizard/sections/basicSettings/BasicSettings.cf.tsx +163 -0
- package/src/serverGroup/configure/wizard/sections/cloneSettings/CloneSettings.cf.tsx +101 -0
- package/src/serverGroup/configure/wizard/sections/configurationSettings/ConfigurationSettings.cf.tsx +230 -0
- package/src/serverGroup/configure/wizard/serverGroup.less +3 -0
- package/src/serverGroup/details/cfServerGroupDetailsGetter.ts +60 -0
- package/src/serverGroup/details/cloudFoundryServerGroupActions.tsx +365 -0
- package/src/serverGroup/details/mapLoadBalancers/CloudFoundryMapLoadBalancersModal.tsx +137 -0
- package/src/serverGroup/details/mapLoadBalancers/CloudFoundryUnmapLoadBalancersModal.tsx +137 -0
- package/src/serverGroup/details/resize/CloudFoundryResizeServerGroupModal.tsx +232 -0
- package/src/serverGroup/details/rollback/CloudFoundryRollbackServerGroupModal.tsx +179 -0
- package/src/serverGroup/details/sections/ApplicationManagerSection.tsx +28 -0
- package/src/serverGroup/details/sections/BoundServicesSection.tsx +39 -0
- package/src/serverGroup/details/sections/BuildSection.tsx +61 -0
- package/src/serverGroup/details/sections/EnvironmentVariablesSection.tsx +34 -0
- package/src/serverGroup/details/sections/HealthCheckSection.tsx +28 -0
- package/src/serverGroup/details/sections/ICloudFoundryServerGroupDetailsSectionProps.ts +6 -0
- package/src/serverGroup/details/sections/MetricsSection.tsx +28 -0
- package/src/serverGroup/details/sections/PackageSection.tsx +27 -0
- package/src/serverGroup/details/sections/ServerGroupInformationSection.tsx +58 -0
- package/src/serverGroup/details/sections/ServerGroupSizingSection.tsx +27 -0
- package/src/serverGroup/details/sections/index.ts +9 -0
- package/src/serverGroup/index.ts +5 -0
- package/src/serverGroup/serverGroup.transformer.ts +42 -0
package/src/presentation/widgets/accountRegionClusterSelector/FormikAccountRegionClusterSelector.tsx
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import type { FormikProps } from 'formik';
|
|
2
|
+
import { get } from 'lodash';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { from as observableFrom, Subject } from 'rxjs';
|
|
5
|
+
import { takeUntil } from 'rxjs/operators';
|
|
6
|
+
|
|
7
|
+
import type { Application, IAccount, IServerGroup, IServerGroupFilter } from '@spinnaker/core';
|
|
8
|
+
import { AppListExtractor, FormikFormField, ReactSelectInput } from '@spinnaker/core';
|
|
9
|
+
import type { ICloudFoundryCreateServerGroupCommand } from '../../../serverGroup';
|
|
10
|
+
|
|
11
|
+
export interface IFormikAccountRegionClusterSelectorProps {
|
|
12
|
+
accounts: IAccount[];
|
|
13
|
+
application: Application;
|
|
14
|
+
cloudProvider: string;
|
|
15
|
+
clusterField?: string;
|
|
16
|
+
componentName?: string;
|
|
17
|
+
credentialsField?: string;
|
|
18
|
+
formik: FormikProps<ICloudFoundryCreateServerGroupCommand>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IFormikAccountRegionClusterSelectorState {
|
|
22
|
+
availableRegions: string[];
|
|
23
|
+
cloudProvider: string;
|
|
24
|
+
clusterField: string;
|
|
25
|
+
clusters: string[];
|
|
26
|
+
componentName: string;
|
|
27
|
+
credentialsField: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export class FormikAccountRegionClusterSelector extends React.Component<
|
|
31
|
+
IFormikAccountRegionClusterSelectorProps,
|
|
32
|
+
IFormikAccountRegionClusterSelectorState
|
|
33
|
+
> {
|
|
34
|
+
private destroy$ = new Subject();
|
|
35
|
+
|
|
36
|
+
constructor(props: IFormikAccountRegionClusterSelectorProps) {
|
|
37
|
+
super(props);
|
|
38
|
+
const credentialsField = props.credentialsField || 'credentials';
|
|
39
|
+
const clusterField = props.clusterField || 'cluster';
|
|
40
|
+
this.state = {
|
|
41
|
+
availableRegions: [],
|
|
42
|
+
cloudProvider: props.cloudProvider,
|
|
43
|
+
clusterField,
|
|
44
|
+
clusters: [],
|
|
45
|
+
componentName: props.componentName || '',
|
|
46
|
+
credentialsField,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public componentDidMount(): void {
|
|
51
|
+
const { componentName, formik } = this.props;
|
|
52
|
+
const { credentialsField } = this.state;
|
|
53
|
+
const credentials = get(
|
|
54
|
+
formik.values,
|
|
55
|
+
componentName ? `${componentName}.${credentialsField}` : `${credentialsField}`,
|
|
56
|
+
undefined,
|
|
57
|
+
);
|
|
58
|
+
const region = get(formik.values, componentName ? `${componentName}.region` : 'region', undefined);
|
|
59
|
+
this.setRegionList(credentials);
|
|
60
|
+
this.setClusterList(credentials, [region]);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public componentWillUnmount(): void {
|
|
64
|
+
this.destroy$.next();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
private setRegionList = (credentials: string): void => {
|
|
68
|
+
const { application } = this.props;
|
|
69
|
+
const accountFilter: IServerGroupFilter = (serverGroup: IServerGroup) =>
|
|
70
|
+
serverGroup ? serverGroup.account === credentials : true;
|
|
71
|
+
observableFrom(application.ready())
|
|
72
|
+
.pipe(takeUntil(this.destroy$))
|
|
73
|
+
.subscribe(() => {
|
|
74
|
+
const availableRegions = AppListExtractor.getRegions([application], accountFilter);
|
|
75
|
+
availableRegions.sort();
|
|
76
|
+
this.setState({ availableRegions });
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
private setClusterList = (credentials: string, regions: string[]): void => {
|
|
81
|
+
const { application } = this.props;
|
|
82
|
+
observableFrom(application.ready())
|
|
83
|
+
.pipe(takeUntil(this.destroy$))
|
|
84
|
+
.subscribe(() => {
|
|
85
|
+
const clusterFilter = AppListExtractor.clusterFilterForCredentialsAndRegion(credentials, regions);
|
|
86
|
+
const clusters = AppListExtractor.getClusters([application], clusterFilter);
|
|
87
|
+
this.setState({ clusters });
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
public accountChanged = (credentials: string): void => {
|
|
92
|
+
this.setRegionList(credentials);
|
|
93
|
+
this.setClusterList(credentials, []);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
public regionChanged = (region: string): void => {
|
|
97
|
+
const { componentName, formik } = this.props;
|
|
98
|
+
const { credentialsField } = this.state;
|
|
99
|
+
const credentials = get(
|
|
100
|
+
formik.values,
|
|
101
|
+
componentName ? `${componentName}.${credentialsField}` : `${credentialsField}`,
|
|
102
|
+
undefined,
|
|
103
|
+
);
|
|
104
|
+
this.setClusterList(credentials, [region]);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
public render() {
|
|
108
|
+
const { accounts } = this.props;
|
|
109
|
+
const { credentialsField, availableRegions, clusters, clusterField, componentName } = this.state;
|
|
110
|
+
return (
|
|
111
|
+
<div className="col-md-9">
|
|
112
|
+
<div className="sp-margin-m-bottom">
|
|
113
|
+
<FormikFormField
|
|
114
|
+
name={componentName ? `${componentName}.${credentialsField}` : `${credentialsField}`}
|
|
115
|
+
label="Account"
|
|
116
|
+
input={(props) => (
|
|
117
|
+
<ReactSelectInput
|
|
118
|
+
inputClassName="cloudfoundry-react-select"
|
|
119
|
+
{...props}
|
|
120
|
+
stringOptions={accounts && accounts.map((acc: IAccount) => acc.name)}
|
|
121
|
+
clearable={false}
|
|
122
|
+
/>
|
|
123
|
+
)}
|
|
124
|
+
onChange={this.accountChanged}
|
|
125
|
+
required={true}
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
<div className="sp-margin-m-bottom">
|
|
130
|
+
<FormikFormField
|
|
131
|
+
name={componentName ? `${componentName}.region` : 'region'}
|
|
132
|
+
label="Region"
|
|
133
|
+
input={(props) => (
|
|
134
|
+
<ReactSelectInput
|
|
135
|
+
inputClassName="cloudfoundry-react-select"
|
|
136
|
+
{...props}
|
|
137
|
+
stringOptions={availableRegions}
|
|
138
|
+
clearable={false}
|
|
139
|
+
/>
|
|
140
|
+
)}
|
|
141
|
+
onChange={this.regionChanged}
|
|
142
|
+
required={true}
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<div className="sp-margin-m-bottom">
|
|
147
|
+
<FormikFormField
|
|
148
|
+
name={componentName ? `${componentName}.${clusterField}` : `${clusterField}`}
|
|
149
|
+
label="Cluster"
|
|
150
|
+
input={(props) => (
|
|
151
|
+
<ReactSelectInput
|
|
152
|
+
inputClassName="cloudfoundry-react-select"
|
|
153
|
+
{...props}
|
|
154
|
+
stringOptions={clusters}
|
|
155
|
+
clearable={false}
|
|
156
|
+
/>
|
|
157
|
+
)}
|
|
158
|
+
required={true}
|
|
159
|
+
/>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './accountRegionClusterSelector/';
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { bindAll } from 'lodash';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Button, Modal } from 'react-bootstrap';
|
|
4
|
+
|
|
5
|
+
import type { IInstanceConsoleOutput } from '@spinnaker/core';
|
|
6
|
+
import { InstanceReader } from '@spinnaker/core';
|
|
7
|
+
|
|
8
|
+
export enum CloudFoundryRecentLogsType {
|
|
9
|
+
APP = 'app',
|
|
10
|
+
TASK = 'task',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ICloudFoundryRecentLogsProps {
|
|
14
|
+
account: string;
|
|
15
|
+
region: string;
|
|
16
|
+
resourceDisplayName: string;
|
|
17
|
+
resourceGuid: string;
|
|
18
|
+
logsType: CloudFoundryRecentLogsType;
|
|
19
|
+
resourceInstanceIndex?: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ICloudFoundryRecentLogsState {
|
|
23
|
+
logs: string;
|
|
24
|
+
showModal: boolean;
|
|
25
|
+
errorMessage: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export class CloudFoundryRecentLogs extends React.Component<
|
|
29
|
+
ICloudFoundryRecentLogsProps,
|
|
30
|
+
ICloudFoundryRecentLogsState
|
|
31
|
+
> {
|
|
32
|
+
constructor(props: ICloudFoundryRecentLogsProps) {
|
|
33
|
+
super(props);
|
|
34
|
+
this.state = {
|
|
35
|
+
logs: '',
|
|
36
|
+
showModal: false,
|
|
37
|
+
errorMessage: null,
|
|
38
|
+
};
|
|
39
|
+
bindAll(this, ['open', 'close', 'onClick']);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
private canShow(): boolean {
|
|
43
|
+
const { resourceGuid } = this.props;
|
|
44
|
+
return resourceGuid !== ''; // or null?
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
private generateResourceId(): string {
|
|
48
|
+
const { resourceGuid, logsType, resourceInstanceIndex } = this.props;
|
|
49
|
+
const optionalInstanceIndex = logsType === CloudFoundryRecentLogsType.APP ? `:${resourceInstanceIndex}` : '';
|
|
50
|
+
return `${logsType}:${resourceGuid}${optionalInstanceIndex}`;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public close() {
|
|
54
|
+
this.setState({ showModal: false });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public open() {
|
|
58
|
+
this.setState({ showModal: true });
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public onClick() {
|
|
62
|
+
const { account, region } = this.props;
|
|
63
|
+
InstanceReader.getConsoleOutput(account, region, this.generateResourceId(), 'cloudfoundry')
|
|
64
|
+
.then((response: IInstanceConsoleOutput) => {
|
|
65
|
+
this.setState({
|
|
66
|
+
logs: response.output as string,
|
|
67
|
+
});
|
|
68
|
+
this.open();
|
|
69
|
+
})
|
|
70
|
+
.catch((exception: any) => {
|
|
71
|
+
this.setState({ errorMessage: exception.data.message });
|
|
72
|
+
this.open();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public render() {
|
|
77
|
+
const { showModal, logs, errorMessage } = this.state;
|
|
78
|
+
if (this.canShow()) {
|
|
79
|
+
return (
|
|
80
|
+
<div>
|
|
81
|
+
<a onClick={this.onClick} className="clickable">
|
|
82
|
+
Recent
|
|
83
|
+
</a>
|
|
84
|
+
<Modal show={showModal} onHide={this.close} dialogClassName="modal-lg modal-fullscreen">
|
|
85
|
+
<Modal.Header closeButton={true}>
|
|
86
|
+
<Modal.Title>Recent logs</Modal.Title>
|
|
87
|
+
<h5>
|
|
88
|
+
CloudFoundry {this.props.logsType.valueOf()} name: {this.props.resourceDisplayName}
|
|
89
|
+
</h5>
|
|
90
|
+
</Modal.Header>
|
|
91
|
+
<Modal.Body>
|
|
92
|
+
{logs.length > 0 && (
|
|
93
|
+
<>
|
|
94
|
+
<pre className="body-small">{logs}</pre>
|
|
95
|
+
</>
|
|
96
|
+
)}
|
|
97
|
+
|
|
98
|
+
{logs.length === 0 && <>No logs returned.</>}
|
|
99
|
+
|
|
100
|
+
{errorMessage && <pre className="body-small">{errorMessage}</pre>}
|
|
101
|
+
</Modal.Body>
|
|
102
|
+
<Modal.Footer>
|
|
103
|
+
<Button onClick={this.close}>Close</Button>
|
|
104
|
+
</Modal.Footer>
|
|
105
|
+
</Modal>
|
|
106
|
+
</div>
|
|
107
|
+
);
|
|
108
|
+
} else {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './routeDomainSelectField';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { ICloudFoundryDomain } from '../domain';
|
|
4
|
+
|
|
5
|
+
export interface IRouteDomainSelectFieldProps {
|
|
6
|
+
account: string;
|
|
7
|
+
component: { [key: string]: any };
|
|
8
|
+
field: string;
|
|
9
|
+
fieldColumns?: number;
|
|
10
|
+
labelColumns: number;
|
|
11
|
+
onChange: (domain: string) => void;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
domains: ICloudFoundryDomain[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function RouteDomainSelectField(props: IRouteDomainSelectFieldProps) {
|
|
17
|
+
return (
|
|
18
|
+
<div className="form-group">
|
|
19
|
+
<div className={`col-md-${props.labelColumns} sm-label-right`}>Domain</div>
|
|
20
|
+
{!props.account && <div className={`col-md-${props.fieldColumns || 7}`}>(Select an account)</div>}
|
|
21
|
+
<div className={`col-md-${props.fieldColumns || 7}`}>
|
|
22
|
+
{props.account && !props.readOnly && (
|
|
23
|
+
<select
|
|
24
|
+
className="form-control input-sm"
|
|
25
|
+
value={props.component[props.field]}
|
|
26
|
+
onChange={(event) => {
|
|
27
|
+
props.component[props.field] = event.target.value;
|
|
28
|
+
props.onChange(event.target.value);
|
|
29
|
+
}}
|
|
30
|
+
required={true}
|
|
31
|
+
>
|
|
32
|
+
<option value="" disabled={true}>
|
|
33
|
+
Select...
|
|
34
|
+
</option>
|
|
35
|
+
{props.domains.map((domain) => {
|
|
36
|
+
return (
|
|
37
|
+
<option key={domain.name} value={domain.name}>
|
|
38
|
+
{domain.name}
|
|
39
|
+
</option>
|
|
40
|
+
);
|
|
41
|
+
})}
|
|
42
|
+
</select>
|
|
43
|
+
)}
|
|
44
|
+
{props.readOnly && <p className="form-control-static">{props.component[props.field]}</p>}
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { Application, IPipeline, IStage } from '@spinnaker/core';
|
|
2
|
+
import type { ICloudFoundryApplication, ICloudFoundryEnvVar, ICloudFoundryServerGroup } from '../../domain';
|
|
3
|
+
|
|
4
|
+
import type {
|
|
5
|
+
ICloudFoundryCreateServerGroupCommand,
|
|
6
|
+
ICloudFoundryDeployConfiguration,
|
|
7
|
+
} from './serverGroupConfigurationModel.cf';
|
|
8
|
+
|
|
9
|
+
export class CloudFoundryServerGroupCommandBuilder {
|
|
10
|
+
private static envVarsFromObject(someObject: any): ICloudFoundryEnvVar[] {
|
|
11
|
+
const envVars = [];
|
|
12
|
+
for (const property in someObject) {
|
|
13
|
+
if (someObject.hasOwnProperty(property)) {
|
|
14
|
+
const envVar = { key: property, value: someObject[property] };
|
|
15
|
+
envVars.push(envVar);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return envVars;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
private static getSubmitButtonLabel(mode: string) {
|
|
22
|
+
switch (mode) {
|
|
23
|
+
case 'createPipeline':
|
|
24
|
+
return 'Add';
|
|
25
|
+
case 'editPipeline':
|
|
26
|
+
case 'editClonePipeline':
|
|
27
|
+
return 'Done';
|
|
28
|
+
case 'clone':
|
|
29
|
+
return 'Clone';
|
|
30
|
+
default:
|
|
31
|
+
return 'Create';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public static buildNewServerGroupCommand(app: Application, defaults: any): ICloudFoundryCreateServerGroupCommand {
|
|
36
|
+
defaults = defaults || {};
|
|
37
|
+
return {
|
|
38
|
+
application: app.name,
|
|
39
|
+
stack: '',
|
|
40
|
+
freeFormDetails: '',
|
|
41
|
+
region: '',
|
|
42
|
+
strategy: '',
|
|
43
|
+
credentials: '',
|
|
44
|
+
viewState: {
|
|
45
|
+
mode: defaults.mode || 'create',
|
|
46
|
+
submitButtonLabel: CloudFoundryServerGroupCommandBuilder.getSubmitButtonLabel(defaults.mode || 'create'),
|
|
47
|
+
},
|
|
48
|
+
selectedProvider: 'cloudfoundry',
|
|
49
|
+
startApplication: true,
|
|
50
|
+
} as ICloudFoundryCreateServerGroupCommand;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public static buildServerGroupCommandFromExisting(
|
|
54
|
+
app: Application,
|
|
55
|
+
serverGroup: ICloudFoundryServerGroup,
|
|
56
|
+
mode = 'clone',
|
|
57
|
+
): ICloudFoundryCreateServerGroupCommand {
|
|
58
|
+
const command: ICloudFoundryCreateServerGroupCommand = this.buildNewServerGroupCommand(app, { mode });
|
|
59
|
+
command.credentials = '';
|
|
60
|
+
command.manifest = {
|
|
61
|
+
direct: {
|
|
62
|
+
memory: serverGroup.memory ? serverGroup.memory + 'M' : '1024M',
|
|
63
|
+
diskQuota: serverGroup.diskQuota ? serverGroup.diskQuota + 'M' : '1024M',
|
|
64
|
+
buildpacks:
|
|
65
|
+
serverGroup.droplet && serverGroup.droplet.buildpacks
|
|
66
|
+
? serverGroup.droplet.buildpacks.map((item) => item.name)
|
|
67
|
+
: [],
|
|
68
|
+
instances: serverGroup.instances ? serverGroup.instances.length : 1,
|
|
69
|
+
routes: serverGroup.loadBalancers || [],
|
|
70
|
+
environment: CloudFoundryServerGroupCommandBuilder.envVarsFromObject(serverGroup.env),
|
|
71
|
+
services: (serverGroup.serviceInstances || []).map((serviceInstance) => serviceInstance.name),
|
|
72
|
+
healthCheckType: 'port',
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
command.region = '';
|
|
76
|
+
command.stack = serverGroup.stack;
|
|
77
|
+
command.freeFormDetails = serverGroup.detail;
|
|
78
|
+
command.source = {
|
|
79
|
+
asgName: serverGroup.name,
|
|
80
|
+
region: serverGroup.region,
|
|
81
|
+
account: serverGroup.account,
|
|
82
|
+
};
|
|
83
|
+
return command;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
public static buildNewServerGroupCommandForPipeline(
|
|
87
|
+
stage: IStage,
|
|
88
|
+
pipeline: IPipeline,
|
|
89
|
+
): ICloudFoundryCreateServerGroupCommand {
|
|
90
|
+
const command: ICloudFoundryCreateServerGroupCommand = this.buildNewServerGroupCommand(
|
|
91
|
+
{ name: pipeline.application } as Application,
|
|
92
|
+
{ mode: 'editPipeline' },
|
|
93
|
+
);
|
|
94
|
+
command.viewState = {
|
|
95
|
+
...command.viewState,
|
|
96
|
+
pipeline,
|
|
97
|
+
requiresTemplateSelection: true,
|
|
98
|
+
stage,
|
|
99
|
+
};
|
|
100
|
+
return command;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
public static buildServerGroupCommandFromPipeline(
|
|
104
|
+
application: ICloudFoundryApplication,
|
|
105
|
+
originalCluster: ICloudFoundryDeployConfiguration,
|
|
106
|
+
stage: IStage,
|
|
107
|
+
pipeline: IPipeline,
|
|
108
|
+
): ICloudFoundryCreateServerGroupCommand {
|
|
109
|
+
const command = this.buildNewServerGroupCommand(application, { mode: 'editPipeline' });
|
|
110
|
+
command.credentials = originalCluster.account;
|
|
111
|
+
command.applicationArtifact = originalCluster.applicationArtifact;
|
|
112
|
+
command.delayBeforeDisableSec = originalCluster.delayBeforeDisableSec;
|
|
113
|
+
command.manifest = originalCluster.manifest;
|
|
114
|
+
command.maxRemainingAsgs = originalCluster.maxRemainingAsgs;
|
|
115
|
+
command.region = originalCluster.region;
|
|
116
|
+
command.rollback = originalCluster.rollback;
|
|
117
|
+
command.strategy = originalCluster.strategy;
|
|
118
|
+
command.startApplication = originalCluster.startApplication;
|
|
119
|
+
command.targetPercentages = originalCluster.targetPercentages;
|
|
120
|
+
command.delayBeforeScaleDownSec = originalCluster.delayBeforeScaleDownSec;
|
|
121
|
+
if (originalCluster.stack) {
|
|
122
|
+
command.stack = originalCluster.stack;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (originalCluster.freeFormDetails) {
|
|
126
|
+
command.freeFormDetails = originalCluster.freeFormDetails;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
command.viewState = {
|
|
130
|
+
...command.viewState,
|
|
131
|
+
pipeline,
|
|
132
|
+
stage,
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
return command;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
public static buildCloneServerGroupCommandFromPipeline(
|
|
139
|
+
stage: IStage,
|
|
140
|
+
pipeline: IPipeline,
|
|
141
|
+
): ICloudFoundryCreateServerGroupCommand {
|
|
142
|
+
const command = this.buildNewServerGroupCommand({ name: pipeline.application } as Application, {
|
|
143
|
+
mode: 'editClonePipeline',
|
|
144
|
+
});
|
|
145
|
+
command.credentials = stage.credentials;
|
|
146
|
+
command.capacity = stage.capacity;
|
|
147
|
+
command.account = stage.account;
|
|
148
|
+
command.delayBeforeDisableSec = stage.delayBeforeDisableSec;
|
|
149
|
+
command.freeFormDetails = stage.freeFormDetails || command.freeFormDetails;
|
|
150
|
+
command.maxRemainingAsgs = stage.maxRemainingAsgs;
|
|
151
|
+
command.region = stage.region;
|
|
152
|
+
command.startApplication = stage.startApplication === undefined || stage.startApplication;
|
|
153
|
+
command.stack = stage.stack || command.stack;
|
|
154
|
+
command.strategy = stage.strategy;
|
|
155
|
+
command.target = stage.target;
|
|
156
|
+
command.targetCluster = stage.targetCluster;
|
|
157
|
+
command.manifest = stage.manifest || command.manifest;
|
|
158
|
+
command.source = stage.source;
|
|
159
|
+
|
|
160
|
+
command.viewState = {
|
|
161
|
+
...command.viewState,
|
|
162
|
+
pipeline,
|
|
163
|
+
stage,
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
return command;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { IQService } from 'angular';
|
|
2
|
+
|
|
3
|
+
import type { Application, IPipeline, IStage } from '@spinnaker/core';
|
|
4
|
+
import type { ICloudFoundryApplication, ICloudFoundryServerGroup } from '../../domain';
|
|
5
|
+
|
|
6
|
+
import { CloudFoundryServerGroupCommandBuilder } from './serverGroupCommandBuilder.service.cf';
|
|
7
|
+
import type {
|
|
8
|
+
ICloudFoundryCreateServerGroupCommand,
|
|
9
|
+
ICloudFoundryDeployConfiguration,
|
|
10
|
+
} from './serverGroupConfigurationModel.cf';
|
|
11
|
+
|
|
12
|
+
export class CloudFoundryServerGroupCommandBuilderShim {
|
|
13
|
+
public static $inject = ['$q'];
|
|
14
|
+
constructor(private $q: IQService) {}
|
|
15
|
+
|
|
16
|
+
public buildNewServerGroupCommand(
|
|
17
|
+
app: Application,
|
|
18
|
+
defaults: any,
|
|
19
|
+
): PromiseLike<ICloudFoundryCreateServerGroupCommand> {
|
|
20
|
+
return this.$q.when(CloudFoundryServerGroupCommandBuilder.buildNewServerGroupCommand(app, defaults));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public buildServerGroupCommandFromExisting(
|
|
24
|
+
app: Application,
|
|
25
|
+
serverGroup: ICloudFoundryServerGroup,
|
|
26
|
+
mode = 'clone',
|
|
27
|
+
): PromiseLike<ICloudFoundryCreateServerGroupCommand> {
|
|
28
|
+
return this.$q.when(
|
|
29
|
+
CloudFoundryServerGroupCommandBuilder.buildServerGroupCommandFromExisting(app, serverGroup, mode),
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public buildNewServerGroupCommandForPipeline(
|
|
34
|
+
stage: IStage,
|
|
35
|
+
pipeline: IPipeline,
|
|
36
|
+
): PromiseLike<ICloudFoundryCreateServerGroupCommand> {
|
|
37
|
+
return this.$q.when(CloudFoundryServerGroupCommandBuilder.buildNewServerGroupCommandForPipeline(stage, pipeline));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public buildServerGroupCommandFromPipeline(
|
|
41
|
+
application: ICloudFoundryApplication,
|
|
42
|
+
originalCluster: ICloudFoundryDeployConfiguration,
|
|
43
|
+
stage: IStage,
|
|
44
|
+
pipeline: IPipeline,
|
|
45
|
+
): PromiseLike<ICloudFoundryCreateServerGroupCommand> {
|
|
46
|
+
return this.$q.when(
|
|
47
|
+
CloudFoundryServerGroupCommandBuilder.buildServerGroupCommandFromPipeline(
|
|
48
|
+
application,
|
|
49
|
+
originalCluster,
|
|
50
|
+
stage,
|
|
51
|
+
pipeline,
|
|
52
|
+
),
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public buildCloneServerGroupCommandFromPipeline(
|
|
57
|
+
stage: IStage,
|
|
58
|
+
pipeline: IPipeline,
|
|
59
|
+
): PromiseLike<ICloudFoundryCreateServerGroupCommand> {
|
|
60
|
+
return this.$q.when(
|
|
61
|
+
CloudFoundryServerGroupCommandBuilder.buildCloneServerGroupCommandFromPipeline(stage, pipeline),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { IArtifact, IPipeline, IServerGroupCommand, IStage } from '@spinnaker/core';
|
|
2
|
+
import type { ICloudFoundryEnvVar } from '../../domain';
|
|
3
|
+
|
|
4
|
+
export interface ICloudFoundryCreateServerGroupCommand extends IServerGroupCommand {
|
|
5
|
+
// clone server group model
|
|
6
|
+
account?: string;
|
|
7
|
+
delayBeforeScaleDownSec?: number;
|
|
8
|
+
rollback?: boolean;
|
|
9
|
+
source?: ICloudFoundrySource;
|
|
10
|
+
target?: string;
|
|
11
|
+
targetCluster?: string;
|
|
12
|
+
targetPercentages?: number[];
|
|
13
|
+
|
|
14
|
+
// deploy server group model
|
|
15
|
+
applicationArtifact?: ICloudFoundryArtifact;
|
|
16
|
+
delayBeforeDisableSec?: number;
|
|
17
|
+
manifest?: ICloudFoundryManifest;
|
|
18
|
+
maxRemainingAsgs?: number;
|
|
19
|
+
startApplication: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface IViewState {
|
|
23
|
+
mode?: string;
|
|
24
|
+
pipeline?: IPipeline;
|
|
25
|
+
requiresTemplateSelection?: boolean;
|
|
26
|
+
stage?: IStage;
|
|
27
|
+
submitButtonLabel?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ICloudFoundryArtifact {
|
|
31
|
+
// one of these two are required
|
|
32
|
+
artifact?: IArtifact;
|
|
33
|
+
artifactId?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ICloudFoundryManifest {
|
|
37
|
+
// one of these three are required
|
|
38
|
+
direct: ICloudFoundryManifestDirectSource;
|
|
39
|
+
artifactId?: string;
|
|
40
|
+
artifact?: IArtifact;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ICloudFoundrySource {
|
|
44
|
+
asgName: string;
|
|
45
|
+
region: string;
|
|
46
|
+
account: string;
|
|
47
|
+
clusterName?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ICloudFoundryManifestDirectSource {
|
|
51
|
+
memory: string;
|
|
52
|
+
diskQuota: string;
|
|
53
|
+
instances: number;
|
|
54
|
+
buildpacks: string[];
|
|
55
|
+
healthCheckType?: string;
|
|
56
|
+
healthCheckHttpEndpoint?: string;
|
|
57
|
+
routes: string[];
|
|
58
|
+
environment: ICloudFoundryEnvVar[];
|
|
59
|
+
services: string[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface ICloudFoundryDeployConfiguration {
|
|
63
|
+
account: string;
|
|
64
|
+
application: string;
|
|
65
|
+
applicationArtifact: ICloudFoundryArtifact;
|
|
66
|
+
delayBeforeDisableSec?: number;
|
|
67
|
+
delayBeforeScaleDownSec?: number;
|
|
68
|
+
freeFormDetails?: string;
|
|
69
|
+
manifest: ICloudFoundryManifest;
|
|
70
|
+
maxRemainingAsgs?: number;
|
|
71
|
+
region: string;
|
|
72
|
+
rollback?: boolean;
|
|
73
|
+
stack?: string;
|
|
74
|
+
startApplication: boolean;
|
|
75
|
+
strategy?: string;
|
|
76
|
+
targetPercentages?: number[];
|
|
77
|
+
}
|