Skip to content

Commit c48078e

Browse files
Merge pull request #672 from devtron-labs/feat/skip-hibernated-deploy
feat: add flag skip If hibernated in trigger cd service
2 parents 93143ac + d102749 commit c48078e

File tree

7 files changed

+12
-8
lines changed

7 files changed

+12
-8
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": "1.11.0",
3+
"version": "1.11.0-pre-1",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/Constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@ export const API_STATUS_CODES = {
384384
EXPECTATION_FAILED: 417,
385385
UNPROCESSABLE_ENTITY: 422,
386386
LOCKED: 423,
387-
UNPROCESSABLE_CONTENT: 422,
388387
}
389388

390389
export enum SERVER_MODE {

src/Pages/Applications/DevtronApps/Details/CDPipeline/services.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export const triggerCDNode = ({
7171
wfrId,
7272
runtimeParamsPayload,
7373
abortControllerRef,
74+
skipIfHibernated,
7475
isRollbackTrigger = false,
7576
}: TriggerCDNodeServiceProps) => {
7677
const areRuntimeParamsConfigured =
@@ -83,6 +84,7 @@ export const triggerCDNode = ({
8384
cdWorkflowType: STAGE_MAP[stageType],
8485
isRollbackDeployment: isRollbackTrigger,
8586
...(areRuntimeParamsConfigured && runtimeParamsPayload),
87+
...(skipIfHibernated ? { skipIfHibernated: true } : {}),
8688
}
8789

8890
if (deploymentWithConfig) {

src/Pages/Applications/DevtronApps/Details/CDPipeline/types.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export interface TriggerCDNodeServiceProps extends Pick<APIOptions, 'abortContro
128128
ciArtifactId: number
129129
appId: number
130130
stageType: DeploymentNodeType
131+
skipIfHibernated: boolean
131132
deploymentWithConfig?: string
132133
wfrId?: number
133134
/**
@@ -139,9 +140,10 @@ export interface TriggerCDNodeServiceProps extends Pick<APIOptions, 'abortContro
139140

140141
export interface TriggerCDPipelinePayloadType
141142
extends Pick<
142-
TriggerCDNodeServiceProps,
143-
'pipelineId' | 'appId' | 'ciArtifactId' | 'runtimeParamsPayload' | 'deploymentWithConfig'
144-
> {
143+
TriggerCDNodeServiceProps,
144+
'pipelineId' | 'appId' | 'ciArtifactId' | 'runtimeParamsPayload' | 'deploymentWithConfig'
145+
>,
146+
Partial<Pick<TriggerCDNodeServiceProps, 'skipIfHibernated'>> {
145147
cdWorkflowType: (typeof STAGE_MAP)[keyof typeof STAGE_MAP]
146148
isRollbackDeployment: boolean
147149
wfrIdForDeploymentWithSpecificTrigger?: number

src/Shared/Providers/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface MainContext {
6565
*/
6666
licenseData: DevtronLicenseInfo
6767
setLicenseData: Dispatch<SetStateAction<DevtronLicenseInfo>>
68+
canFetchHelmAppStatus: boolean
6869
}
6970

7071
export interface MainContextProviderProps {

src/Shared/Services/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export interface GetResourceApiUrlProps<T> extends BaseGetApiUrlProps<T, Resourc
5555
export interface GetPolicyApiUrlProps<T>
5656
extends Omit<BaseGetApiUrlProps<T, PolicyKindType, ResourceVersionType>, 'baseUrl'> {}
5757

58-
export interface EnvironmentDataValuesDTO extends Pick<MainContext, 'featureGitOpsFlags'> {
58+
export interface EnvironmentDataValuesDTO extends Pick<MainContext, 'featureGitOpsFlags' | 'canFetchHelmAppStatus'> {
5959
isAirGapEnvironment: boolean
6060
isManifestScanningEnabled: boolean
6161
canOnlyViewPermittedEnvOrgLevel: boolean

0 commit comments

Comments
 (0)