Skip to content

Commit

Permalink
feat(monitored deploy): expose monitor deploy orca endpoints
Browse files Browse the repository at this point in the history
expose endpoint from spinnaker/orca#3138
  • Loading branch information
marchello2000 committed Sep 13, 2019
1 parent 084e821 commit 09b3793
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2019 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.netflix.spinnaker.gate.controllers;

import com.netflix.spinnaker.gate.security.RequestContext;
import com.netflix.spinnaker.gate.services.internal.OrcaServiceSelector;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/capabilities")
@RequiredArgsConstructor
public class CapabilitiesController {

private final OrcaServiceSelector orcaService;

@ApiOperation(value = "Retrieve the list configured deployment monitors", response = List.class)
@GetMapping(value = "/deploymentMonitors")
List<Object> getDeploymentMonitors() {
return orcaService.withContext(RequestContext.get()).getDeploymentMonitors();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,7 @@ interface OrcaService {

@POST("/concourse/stage/start")
Response concourseStageExecution(@Query("stageId") String stageId, @Query("job") String job, @Query("buildNumber") Integer buildNumber, @Body String emptyBody);

@GET("/capabilities/deploymentMonitors")
List<Object> getDeploymentMonitors();
}

0 comments on commit 09b3793

Please sign in to comment.