Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(Execution): Allow ignoring failed stages #1452

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ Map restartPipelineStage(
@Path("stageId") String stageId,
@Body Map restartDetails);

@Headers("Accept: application/json")
@PUT("/pipelines/{executionId}/stages/{stageId}/ignoreFailure")
Map ignorePipelineStageFailure(
@Path("executionId") String executionId,
@Path("stageId") String stageId,
@Body Map ignoreFailureDetails);

@Headers("Accept: application/json")
@POST("/orchestrate")
Map startPipeline(@Body Map pipelineConfig, @Query("user") String user);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ class PipelineController {
pipelineService.restartPipelineStage(id, stageId, context)
}

@ApiOperation(value = "Ignore the failure of a stage", response = HashMap.class)
@PutMapping("/{id}/stages/{stageId}/ignoreFailure")
Map ignoreStageFailure(@PathVariable("id") String id, @PathVariable("stageId") String stageId, @RequestBody Map context) {
pipelineService.ignorePipelineStageFailure(id, stageId, context)
}

@ApiOperation(value = "Delete a pipeline execution", response = HashMap.class)
@DeleteMapping("{id}")
Map deletePipeline(@PathVariable("id") String id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ class PipelineService {
orcaServiceSelector.select().restartPipelineStage(executionId, stageId, context)
}

Map ignorePipelineStageFailure(String executionId, String stageId, Map context) {
setApplicationForExecution(executionId)
orcaServiceSelector.select().ignorePipelineStageFailure(executionId, stageId, context)
}

Map evaluateExpressionForExecution(String executionId, String pipelineExpression) {
orcaServiceSelector.select().evaluateExpressionForExecution(executionId, pipelineExpression)
}
Expand Down