|
|
@@ -5,10 +5,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import seecoder.devcloud.web.model.vo.Response;
|
|
|
import seecoder.devcloud.web.model.vo.pipeline.DeploymentInfoVO;
|
|
|
import seecoder.devcloud.web.service.pipeline.DeploymentService;
|
|
|
@@ -34,6 +31,7 @@ public class DeploymentController {
|
|
|
|
|
|
@ApiOperation(value = "获取项目所有部署的实例信息", httpMethod = "GET")
|
|
|
@ApiImplicitParam(name = "projectId", dataType = "int")
|
|
|
+ @GetMapping("/list")
|
|
|
public Response<List<DeploymentInfoVO>> retrieveDeploymentInfos(@RequestParam("projectId")Integer projectId){
|
|
|
return Response.buildSuccess(deploymentService.retrieveDeploymentInfos(projectId));
|
|
|
}
|
|
|
@@ -44,6 +42,7 @@ public class DeploymentController {
|
|
|
@ApiImplicitParam(name = "projectId", dataType = "int"),
|
|
|
@ApiImplicitParam(name = "pipelineId", dataType = "int")
|
|
|
})
|
|
|
+ @PostMapping
|
|
|
public Response deploy(@RequestParam("projectId")Integer projectId,
|
|
|
@RequestParam("pipelineId")Integer pipelineId){
|
|
|
deploymentService.deploy(projectId,pipelineId);
|
|
|
@@ -59,6 +58,7 @@ public class DeploymentController {
|
|
|
@ApiImplicitParam(name = "projectId", dataType = "int"),
|
|
|
@ApiImplicitParam(name = "pipelineId", dataType = "int")
|
|
|
})
|
|
|
+ @DeleteMapping
|
|
|
public Response delete(@RequestParam("projectId")Integer projectId,
|
|
|
@RequestParam("pipelineId")Integer pipelineId){
|
|
|
deploymentService.deploy(projectId,pipelineId);
|