diff --git a/package-lock.json b/package-lock.json index 01938014c..4de27b84f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.13.0", + "version": "1.13.0-beta-7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.13.0", + "version": "1.13.0-beta-7", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index a10088e67..351847c19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.13.0", + "version": "1.13.0-beta-7", "description": "Supporting common component library", "type": "module", "main": "dist/index.js", diff --git a/src/Assets/IconV2/ic-fast-forward.svg b/src/Assets/IconV2/ic-fast-forward.svg new file mode 100644 index 000000000..97cf87d0d --- /dev/null +++ b/src/Assets/IconV2/ic-fast-forward.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/Assets/IconV2/ic-lego.svg b/src/Assets/IconV2/ic-lego.svg new file mode 100644 index 000000000..fbefc99b3 --- /dev/null +++ b/src/Assets/IconV2/ic-lego.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Assets/IconV2/ic-magnifying-glass.svg b/src/Assets/IconV2/ic-magnifying-glass.svg new file mode 100644 index 000000000..f560eb621 --- /dev/null +++ b/src/Assets/IconV2/ic-magnifying-glass.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Assets/IconV2/ic-play-outline.svg b/src/Assets/IconV2/ic-play-outline.svg new file mode 100644 index 000000000..991073048 --- /dev/null +++ b/src/Assets/IconV2/ic-play-outline.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Common/Types.ts b/src/Common/Types.ts index 9f67632bd..4dc7b9bbd 100644 --- a/src/Common/Types.ts +++ b/src/Common/Types.ts @@ -28,6 +28,7 @@ import { ButtonProps, ComponentLayoutType, StatusType, + DeploymentStrategyType, } from '../Shared' import { ACTION_STATE, @@ -845,7 +846,7 @@ export interface AppEnvironment { } export interface Strategy { - deploymentTemplate: string + deploymentTemplate: DeploymentStrategyType config: any default?: boolean } diff --git a/src/Pages/Applications/DevtronApps/Details/CDPipeline/services.ts b/src/Pages/Applications/DevtronApps/Details/CDPipeline/services.ts index 3dcbaa952..de98bd239 100644 --- a/src/Pages/Applications/DevtronApps/Details/CDPipeline/services.ts +++ b/src/Pages/Applications/DevtronApps/Details/CDPipeline/services.ts @@ -73,6 +73,7 @@ export const triggerCDNode = ({ abortControllerRef, skipIfHibernated, isRollbackTrigger = false, + strategy, }: TriggerCDNodeServiceProps) => { const areRuntimeParamsConfigured = runtimeParamsPayload && (stageType === DeploymentNodeType.POSTCD || stageType === DeploymentNodeType.PRECD) @@ -85,6 +86,7 @@ export const triggerCDNode = ({ isRollbackDeployment: isRollbackTrigger, ...(areRuntimeParamsConfigured && runtimeParamsPayload), ...(skipIfHibernated ? { skipIfHibernated: true } : {}), + ...(strategy ? { strategy } : {}), } if (deploymentWithConfig) { diff --git a/src/Pages/Applications/DevtronApps/Details/CDPipeline/types.tsx b/src/Pages/Applications/DevtronApps/Details/CDPipeline/types.tsx index cf167f860..7f3ce0d8f 100644 --- a/src/Pages/Applications/DevtronApps/Details/CDPipeline/types.tsx +++ b/src/Pages/Applications/DevtronApps/Details/CDPipeline/types.tsx @@ -17,7 +17,7 @@ import { BuildStageType, FormType } from '@Common/CIPipeline.Types' import { APIOptions, DeploymentAppTypes, DeploymentNodeType } from '@Common/Types' import { DeploymentStrategy } from '@Shared/Components' -import { EnvListMinDTO, RuntimeParamsTriggerPayloadType } from '@Shared/types' +import { DeploymentStrategyType, EnvListMinDTO, RuntimeParamsTriggerPayloadType } from '@Shared/types' import { STAGE_MAP } from '@Pages/index' interface ConfigSecretType { @@ -136,6 +136,7 @@ export interface TriggerCDNodeServiceProps extends Pick ( +
+
+ + +
+
+ +
+
+) + +export default LoadingCard diff --git a/src/Shared/Components/index.ts b/src/Shared/Components/index.ts index abcb23727..fd86c73ba 100644 --- a/src/Shared/Components/index.ts +++ b/src/Shared/Components/index.ts @@ -72,6 +72,7 @@ export * from './InfoIconTippy' export * from './InvalidYAMLTippy' export * from './KeyValueTable' export * from './License' +export { default as LoadingCard } from './LoadingCard' export * from './LoginBanner' export * from './MaterialHistory' export * from './ModalSidebarPanel' diff --git a/src/Shared/types.ts b/src/Shared/types.ts index de093cf87..f07ec60a9 100644 --- a/src/Shared/types.ts +++ b/src/Shared/types.ts @@ -1161,3 +1161,7 @@ export interface IntelligenceConfig { } export type DeploymentStrategyType = 'CANARY' | 'ROLLING' | 'RECREATE' | 'BLUE-GREEN' + +export type DeploymentStrategyTypeWithDefault = DeploymentStrategyType | 'DEFAULT' + +export type PipelineIdsVsDeploymentStrategyMap = Record