Skip to content

Commit

Permalink
Added temp code for fetching all running pipelines. (#41)
Browse files Browse the repository at this point in the history
* Added temp code for fetching all running pipelines.

* Updating README with brief commit details

---------

Co-authored-by: GitHub Action <action@github.com>
  • Loading branch information
sanopsmx and actions-user authored Aug 17, 2023
1 parent 998f32a commit e326b13
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,7 @@ The JVM will _not_ wait for the debugger to be attached before starting Orca; th



1a7b275557c1a537c19beb51038dc2e2c0b2c2ca | Yugandharkumar | Create commits-preserve.yml | 2023-08-09
1a7b275557c1a537c19beb51038dc2e2c0b2c2ca | Yugandharkumar | Create commits-preserve.yml | 2023-08-09


57e86d40b432a6748e154f2dfd9ae3bad8764094 | sanopsmx | Added temp code for fetching all running pipelines. | 2023-08-17
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,23 @@ class TaskController {
[]
}

@RequestMapping(value = "/pipelines/allrunning", method = RequestMethod.GET)
List<OrchestrationViewModel> allRunningPipelines(@RequestParam(value = "statuses", required = false) String statuses) {
ExecutionComparator sortType = BUILD_TIME_DESC
ExecutionCriteria executionCriteria = new ExecutionCriteria()
.setSortType(sortType)

if (statuses != null && statuses != "") {
executionCriteria.setStatuses(statuses.split(",").toList())
} else {
statuses = "RUNNING";
executionCriteria.setStatuses(statuses.split(",").toList())
}
executionRepository.retrieve(PIPELINE, executionCriteria).toBlocking().iterator.collect {
convert it
}
}

@PreAuthorize("@fiatPermissionEvaluator.storeWholePermission()")
@PostFilter("hasPermission(this.getPipeline(filterObject)?.application, 'APPLICATION', 'READ')")
@RequestMapping(value = "/pipelines/waiting", method = RequestMethod.GET)
Expand Down

0 comments on commit e326b13

Please sign in to comment.