Skip to content

Commit

Permalink
Merge pull request #173 from ajordens/pause-resume-endpoints
Browse files Browse the repository at this point in the history
Pause/resume endpoints
  • Loading branch information
ajordens committed Jan 11, 2016
2 parents 6364f1d + f6fe8b6 commit c4ca24e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ class PipelineController {
pipelineService.cancelPipeline(id)
}

@RequestMapping(value = "{id}/pause", method = RequestMethod.PUT)
Map pausePipeline(@PathVariable("id") String id) {
pipelineService.pausePipeline(id)
}

@RequestMapping(value = "{id}/resume", method = RequestMethod.PUT)
Map resumePipeline(@PathVariable("id") String id) {
pipelineService.resumePipeline(id)
}

@RequestMapping(value = "/{id}/stages/{stageId}", method = RequestMethod.PATCH)
Map updateStage(@PathVariable("id") String id, @PathVariable("stageId") String stageId, @RequestBody Map context) {
pipelineService.updatePipelineStage(id, stageId, context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ class PipelineService {
orcaService.cancelPipeline(id)
}

Map pausePipeline(String id) {
orcaService.pausePipeline(id)
}

Map resumePipeline(String id) {
orcaService.resumePipeline(id)
}

Map deletePipeline(String id) {
orcaService.deletePipeline(id)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ interface OrcaService {
@PUT("/pipelines/{id}/cancel")
Map cancelPipeline(@Path("id") String id)

@Headers("Accept: application/json")
@PUT("/pipelines/{id}/pause")
Map pausePipeline(@Path("id") String id)

@Headers("Accept: application/json")
@PUT("/pipelines/{id}/resume")
Map resumePipeline(@Path("id") String id)

@Headers("Accept: application/json")
@DELETE("/pipelines/{id}")
Map deletePipeline(@Path("id") String id)
Expand Down

0 comments on commit c4ca24e

Please sign in to comment.