worker添加,自定义镜像worker修改,机器管理接口添加
This commit is contained in:
parent
3ff9040893
commit
4029e7d497
@ -0,0 +1,23 @@
|
||||
package cd.casic.ci.process.engine.worker;
|
||||
|
||||
import cd.casic.ci.common.pipeline.annotation.Plugin;
|
||||
import cd.casic.ci.process.engine.runContext.TaskRunContext;
|
||||
import cd.casic.ci.process.process.dataObject.base.PipBaseElement;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 目标处理worker
|
||||
*
|
||||
* */
|
||||
@Slf4j
|
||||
@Plugin(taskType = "code")
|
||||
public class TargetHandleWorker extends BaseWorker{
|
||||
@Override
|
||||
public void execute(TaskRunContext context) {
|
||||
PipBaseElement contextDef = context.getContextDef();
|
||||
String id = contextDef.getId();
|
||||
log.info("==============触发worker执行========");
|
||||
log.info("==========运行context:{}===========", JSON.toJSONString(context));
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ import cd.casic.ci.process.process.dataObject.machine.MachineInfo;
|
||||
import cd.casic.ci.process.process.service.machine.MachineInfoService;
|
||||
import cd.casic.framework.commons.pojo.CommonResult;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@ -14,7 +15,7 @@ import java.util.List;
|
||||
public class MachineController {
|
||||
@Resource
|
||||
private MachineInfoService machineInfoService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public CommonResult<List<MachineInfo>> list(){
|
||||
return CommonResult.success(machineInfoService.list());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user