Skip to content

Commit

Permalink
1.30.1 v8.31.1 jaeger app create (#43)
Browse files Browse the repository at this point in the history
* Added temp code for fetching all running pipelines.

* Added temp code 2 for fetching all running pipelines.
  • Loading branch information
sanopsmx authored Aug 21, 2023
1 parent 77adf1e commit 670428c
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,18 @@ class TaskController {
executionOperator.cancel(PIPELINE, id, AuthenticatedRequest.getSpinnakerUser().orElse("anonymous"), reason)
}

@RequestMapping(value = "/pipelinesList/cancel", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.ACCEPTED)
void cancelRunningPipelines(
@RequestBody List<String> pipelineIdList, @RequestParam(required = false) String reason,
@RequestParam(defaultValue = "false") boolean force) {

log.info("*********Start of cancelRunningPipelines ");
for( String id : pipelineIdList) {
executionOperator.cancel(PIPELINE, id, AuthenticatedRequest.getSpinnakerUser().orElse("anonymous"), reason)
}
}

@PreAuthorize("hasPermission(this.getPipeline(#id)?.application, 'APPLICATION', 'EXECUTE') && hasPermission(this.getPipeline(#id)?.name, 'PIPELINE', 'EXECUTE')")
@RequestMapping(value = "/pipelines/{id}/pause", method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.ACCEPTED)
Expand Down

0 comments on commit 670428c

Please sign in to comment.