Skip to content

Commit 225262b

Browse files
authored
Merge pull request #237 from devtron-labs/feat/migrate-helm-release
feat: migrate helm release
2 parents 80299a4 + 9ce87d1 commit 225262b

File tree

6 files changed

+97
-4
lines changed

6 files changed

+97
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.2.7",
3+
"version": "0.2.8",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Pages/CDPipeline/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './types'

src/Pages/CDPipeline/types.tsx

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
import { BuildStageType, FormType } from '@Common/CIPipeline.Types'
2+
import { DeploymentAppTypes } from '@Common/Types'
3+
import { DeploymentStrategy } from '@Shared/Components'
4+
import { EnvListMinDTO } from '@Shared/types'
5+
6+
interface ConfigSecretType {
7+
label: string
8+
value: string
9+
type: string
10+
}
11+
12+
export interface Environment
13+
extends Pick<EnvListMinDTO, 'id' | 'active' | 'namespace' | 'isClusterCdActive'>,
14+
Partial<
15+
Pick<
16+
EnvListMinDTO,
17+
'isVirtualEnvironment' | 'allowedDeploymentTypes' | 'description' | 'isDigestEnforcedForEnv'
18+
>
19+
> {
20+
name: string
21+
clusterName: string
22+
clusterId: string
23+
}
24+
25+
export interface PipelineBuildStageType extends BuildStageType {
26+
triggerType?: string
27+
}
28+
29+
export interface SavedDeploymentStrategy extends DeploymentStrategy {
30+
isCollapsed?: boolean
31+
defaultConfig?: any
32+
yamlStr?: any
33+
jsonStr?: any
34+
}
35+
36+
export interface CustomTagType {
37+
tagPattern: string
38+
counterX: string
39+
}
40+
41+
export enum ReleaseMode {
42+
NEW_DEPLOYMENT = 'create',
43+
MIGRATE_HELM = 'link',
44+
}
45+
46+
export interface CDFormType {
47+
name: string
48+
ciPipelineId: number
49+
environmentId: number
50+
environmentName: string
51+
namespace: string
52+
environments: Environment[]
53+
deploymentAppType: string
54+
deploymentAppName?: string
55+
releaseMode: ReleaseMode
56+
triggerType: string
57+
preBuildStage?: PipelineBuildStageType
58+
postBuildStage?: PipelineBuildStageType
59+
strategies: DeploymentStrategy[]
60+
savedStrategies: SavedDeploymentStrategy[]
61+
preStageConfigMapSecretNames: { configMaps: ConfigSecretType[]; secrets: ConfigSecretType[] }
62+
postStageConfigMapSecretNames: { configMaps: ConfigSecretType[]; secrets: ConfigSecretType[] }
63+
requiredApprovals: string
64+
userApprovalConfig?: {
65+
requiredCount: number
66+
}
67+
isClusterCdActive: boolean
68+
deploymentAppCreated: boolean
69+
clusterId: string
70+
clusterName: string
71+
runPreStageInEnv: boolean
72+
runPostStageInEnv: boolean
73+
allowedDeploymentTypes: DeploymentAppTypes[]
74+
containerRegistryName: string
75+
repoName: string
76+
selectedRegistry: any
77+
generatedHelmPushAction: string
78+
}
79+
80+
export interface PipelineFormType extends Partial<FormType>, Partial<CDFormType> {
81+
name: string
82+
triggerType: string
83+
preBuildStage?: PipelineBuildStageType
84+
postBuildStage?: PipelineBuildStageType
85+
defaultTag?: string[]
86+
customTag?: CustomTagType
87+
enableCustomTag?: boolean
88+
customTagStage?: string
89+
isDigestEnforcedForPipeline?: boolean
90+
isDigestEnforcedForEnv?: boolean
91+
}

src/Pages/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616

1717
export * from './GlobalConfigurations'
1818
export * from './ResourceBrowser'
19+
export * from './CDPipeline'

src/Shared/Components/CICDHistory/types.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ export interface DeploymentHistory {
611611

612612
type DeploymentStrategyType = 'CANARY' | 'ROLLING' | 'RECREATE' | 'BLUE_GREEN'
613613

614-
interface DeploymentStrategy {
614+
export interface DeploymentStrategy {
615615
deploymentTemplate: DeploymentStrategyType
616616
config: any
617617
default: boolean

0 commit comments

Comments
 (0)