Skip to content

Commit 2148af1

Browse files
authored
Merge pull request #654 from devtron-labs/feat/force-abort-cd
feat: add param force abort for pre and post cd
2 parents 71a643f + 87cff25 commit 2148af1

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
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.9.0-patch-4",
3+
"version": "1.9.0-patch-5",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Components/CICDHistory/TriggerDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const ProgressingStatus = memo(({ stage, type, label = 'In progress' }: Progress
119119
if (type === HistoryComponentType.CI) {
120120
abort = (isForceAbort: boolean) => cancelCiTrigger({ pipelineId, workflowId: buildId }, isForceAbort)
121121
} else if (stage !== DeploymentStageType.DEPLOY) {
122-
abort = () => cancelPrePostCdTrigger(pipelineId, triggerId)
122+
abort = (isForceAbort: boolean) => cancelPrePostCdTrigger(pipelineId, triggerId, isForceAbort)
123123
}
124124

125125
async function abortRunning() {

src/Shared/Components/CICDHistory/service.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ export const cancelCiTrigger = (params, isForceAbort) => {
7474
return trash(URL)
7575
}
7676

77-
export const cancelPrePostCdTrigger = (pipelineId, workflowRunner) => {
78-
const URL = `${ROUTES.CD_MATERIAL_GET}/${pipelineId}/workflowRunner/${workflowRunner}`
77+
export const cancelPrePostCdTrigger = (pipelineId, workflowRunner, isForceAbort: boolean) => {
78+
const URL = getUrlWithSearchParams(`${ROUTES.CD_MATERIAL_GET}/${pipelineId}/workflowRunner/${workflowRunner}`, {
79+
forceAbort: isForceAbort,
80+
})
7981
return trash(URL)
8082
}
8183

0 commit comments

Comments
 (0)