Skip to content

Commit

Permalink
Merge pull request #51 from devtron-labs/chore/add-ci-types
Browse files Browse the repository at this point in the history
chore: add ci types
  • Loading branch information
AbhishekA1509 authored Nov 28, 2023
2 parents fea3499 + bb425ad commit 324e8e2
Show file tree
Hide file tree
Showing 2 changed files with 149 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
"version": "0.0.41-beta-1",
"version": "0.0.41-beta-8",
"description": "Supporting common component library",
"main": "dist/index.js",
"scripts": {
Expand Down
148 changes: 148 additions & 0 deletions src/Common/Types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { ReactNode, CSSProperties } from 'react'
import { Placement } from 'tippy.js'
import { ImageComment, ReleaseTag } from './ImageTags.Types'
import { DockerConfigOverrideType, TaskErrorObj } from '.'

export interface ResponseType {
code: number
status: string
Expand Down Expand Up @@ -475,3 +477,149 @@ export interface AsyncState<T> {
export interface AsyncOptions {
resetOnChange: boolean
}

export interface AppEnvironment {
environmentId: number
environmentName: string
appMetrics: boolean
infraMetrics: boolean
prod: boolean
chartRefId?: number
lastDeployed?: string
lastDeployedBy?: string
lastDeployedImage?: string
appStatus?: string
deploymentAppDeleteRequest?: boolean
isVirtualEnvironment?: boolean
isProtected?: boolean
pipelineId?: number
latestCdWorkflowRunnerId?: number
}

export interface Strategy {
deploymentTemplate: string
config: any
default?: boolean
}

export interface CDStage {
status: string
name: string
triggerType: 'AUTOMATIC' | 'MANUAL'
config: string
}

export interface CDStageConfigMapSecretNames {
configMaps: any[]
secrets: any[]
}

export interface PrePostDeployStageType {
isValid: boolean
steps: TaskErrorObj[]
triggerType: string
name: string
status: string
}

export interface CdPipeline {
id: number
environmentId: number
environmentName?: string
description?: string
ciPipelineId: number
triggerType: 'AUTOMATIC' | 'MANUAL'
name: string
strategies?: Strategy[]
namespace?: string
appWorkflowId?: number
deploymentTemplate?: string
preStage?: CDStage
postStage?: CDStage
preStageConfigMapSecretNames?: CDStageConfigMapSecretNames
postStageConfigMapSecretNames?: CDStageConfigMapSecretNames
runPreStageInEnv?: boolean
runPostStageInEnv?: boolean
isClusterCdActive?: boolean
parentPipelineId?: number
parentPipelineType?: string
deploymentAppDeleteRequest?: boolean
deploymentAppCreated?: boolean
userApprovalConfig?: UserApprovalConfigType
isVirtualEnvironment?: boolean
deploymentAppType: DeploymentAppTypes
helmPackageName?: string
preDeployStage?: PrePostDeployStageType
postDeployStage?: PrePostDeployStageType
isProdEnv?: boolean
}

export interface ExternalCiConfig {
id: number
webhookUrl: string
payload: string
accessKey: string
}

export interface Source {
type: string
value?: string
regex?: string
}

export interface CiMaterial {
source: Source
gitMaterialId: number
id: number
gitMaterialName: string
isRegex?: boolean
}

export interface Task {
name?: string
type?: string
cmd?: string
args?: Array<string>
}

export interface CiScript {
id: number
index: number
name: string
script: string
outputLocation?: string
}

export interface CiPipeline {
isManual: boolean
dockerArgs?: Map<string, string>
isExternal: boolean
parentCiPipeline: number
parentAppId: number
externalCiConfig: ExternalCiConfig
ciMaterial?: CiMaterial[]
name?: string
id?: number
active?: boolean
linkedCount: number
scanEnabled: boolean
deleted?: boolean
version?: string
beforeDockerBuild?: Array<Task>
afterDockerBuild?: Array<Task>
appWorkflowId?: number
beforeDockerBuildScripts?: Array<CiScript>
afterDockerBuildScripts?: Array<CiScript>
isDockerConfigOverridden?: boolean
dockerConfigOverride?: DockerConfigOverrideType
appName?: string
appId?: string
componentId?: number
isCITriggerBlocked?: boolean
ciBlockState?: {
action: any
metadataField: string
}
isOffendingMandatoryPlugin?: boolean
pipelineType?: string
}

0 comments on commit 324e8e2

Please sign in to comment.