package cn.reghao.devops.web.mgr.app.service;

import cn.reghao.devops.common.msg.event.EvtAppStatResult;
import cn.reghao.devops.web.mgr.app.model.dto.DeployConfigDto;
import cn.reghao.devops.web.mgr.app.model.po.AppBuilding;
import cn.reghao.devops.web.mgr.machine.model.po.MachineHost;
import cn.reghao.jutil.jdk.result.Result;

/**
 * @author reghao
 * @date 2021-10-22 14:45:22
 */
public interface AppDeployService {
    Result addDeployConfig(DeployConfigDto deployConfigDto);
    Result updateStartScript(DeployConfigDto deployConfigDto);
    Result deleteDeployConfig(int appDeployConfigId);
    void deleteByMachineHost(MachineHost machineHost);
    void deleteAppDeploying(String appId, String machineId);
    void deleteDeployLog(String buildLogId);

    void afterBuild(AppBuilding appBuilding);
    void beforeDeploy(AppBuilding appBuilding, String machineId, String deployBy);
    void afterDeploy(EvtAppStatResult statResult);
    void refresh(EvtAppStatResult statResult);
}
