Skip to content

Commit

Permalink
feat(md): expose nicer veto endpoints (#1420)
Browse files Browse the repository at this point in the history
  • Loading branch information
emjburns committed Feb 9, 2021
1 parent bf546f2 commit af238d9
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 @@ -150,13 +150,19 @@ Response deletePinForEnvironment(
@POST("/application/{application}/veto")
Response veto(@Path("application") String application, @Body EnvironmentArtifactVeto veto);

@POST("/application/{application}/mark/bad")
Response markBad(@Path("application") String application, @Body EnvironmentArtifactVeto veto);

@DELETE("/application/{application}/veto/{targetEnvironment}/{reference}/{version}")
Response deleteVeto(
@Path("application") String application,
@Path("targetEnvironment") String targetEnvironment,
@Path("reference") String reference,
@Path("version") String version);

@POST("/application/{application}/mark/good")
Response markGood(@Path("application") String application, @Body EnvironmentArtifactVeto veto);

@GET("/installedPlugins")
List<SpinnakerPluginDescriptor> getInstalledPlugins();
}
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,20 @@ void deleteVeto(
keelService.deleteVeto(application, targetEnvironment, reference, version);
}

@ApiOperation(value = "Veto an artifact version in an environment")
@PostMapping(path = "/application/{application}/mark/bad")
void markBad(
@PathVariable("application") String application, @RequestBody EnvironmentArtifactVeto veto) {
keelService.markBad(application, veto);
}

@ApiOperation(value = "Veto an artifact version in an environment")
@PostMapping(path = "/application/{application}/mark/good")
void markGood(
@PathVariable("application") String application, @RequestBody EnvironmentArtifactVeto veto) {
keelService.markGood(application, veto);
}

@PostMapping(
path = "/notifications/callbacks/{source}",
consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
Expand Down

0 comments on commit af238d9

Please sign in to comment.