Skip to content

Commit

Permalink
feat(managed): allow retrieval of resources in YAML format (spinnaker…
Browse files Browse the repository at this point in the history
  • Loading branch information
robfletcher authored Sep 16, 2020
1 parent 7051ee0 commit 3636b5a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ List<Map<String, Object>> getResourceEvents(
@GET("/resources/{name}")
Resource getResource(@Path("name") String name);

@GET("/resources/{name}")
@Headers("Accept: application/x-yaml")
Resource getResourceYaml(@Path("name") String name);

@GET("/resources/{name}/status")
String getResourceStatus(@Path("name") String name);

Expand All @@ -59,6 +63,10 @@ List<Map<String, Object>> getResourceEvents(
@GET("/delivery-configs/{name}")
DeliveryConfig getManifest(@Path("name") String name);

@GET("/delivery-configs/{name}")
@Headers("Accept: application/x-yaml")
DeliveryConfig getManifestYaml(@Path("name") String name);

@GET("/delivery-configs/{name}/artifacts")
List<Map<String, Object>> getManifestArtifacts(@Path("name") String name);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ Resource getResource(@PathVariable("resourceId") String resourceId) {
return keelService.getResource(resourceId);
}

@ApiOperation(value = "Get a resource", response = Resource.class)
@GetMapping(path = "/resources/{resourceId}.yml", produces = APPLICATION_YAML_VALUE)
Resource getResourceYaml(@PathVariable("resourceId") String resourceId) {
return keelService.getResourceYaml(resourceId);
}

@ApiOperation(value = "Get status of a resource", response = Map.class)
@GetMapping(path = "/resources/{resourceId}/status")
Map getResourceStatus(@PathVariable("resourceId") String resourceId) {
Expand Down Expand Up @@ -147,6 +153,12 @@ DeliveryConfig getManifest(@PathVariable("name") String name) {
return keelService.getManifest(name);
}

@ApiOperation(value = "Get a delivery config manifest", response = DeliveryConfig.class)
@GetMapping(path = "/delivery-configs/{name}.yml", produces = APPLICATION_YAML_VALUE)
DeliveryConfig getManifestYaml(@PathVariable("name") String name) {
return keelService.getManifestYaml(name);
}

@ApiOperation(
value = "Get the status of each version of each artifact in each environment",
response = List.class)
Expand Down

0 comments on commit 3636b5a

Please sign in to comment.