4.关键接口设计
发布流水线接口
//创建发布流水线
ReleasePipeline createReleasePipeline(ReleasePipeline releasePipeline)
//删除发布流水线
ReleasePipeline removeReleasePipeline(String releasePipelineId)
//启动发布流水线,注意:需要传递启动的发布定义,以及不执行的流水线任务
ReleasePipelineInstance startReleasePipeline(String releasePipelineId, String[] releaseDefinitionIds, String[] disableEngineStageIds)
//查询某一个发布流水线下的所有发布流水线实例
PageResultList<ReleasePipelineInstance> queryReleasePipelineInstances(String releasePipelineId, boolean cascadeReleaseInstance, int pageIndex, int pageSize)
发布流水线接口关键功能:
1)编辑:创建、修改、克隆、删除发布流水线等
2)操作:启动、终止发布流水线等
3)查询:查询发布流水线实例的进度、状态等
发布定义接口
//创建发布定义
ReleaseDefinition createReleaseDefinition(ReleaseDefinition releaseDefinition)
//删除发布定义
ReleaseDefinition removeReleaseDefinition(String releaseDefinitionId)
//启动发布定义,注意:需要传递要部署的发布环境,以及不执行的流水线任务
ReleaseInstance startRelease(String releaseDefinitionId, String[]releaseEnvIds, String[] disableEngineStageIds)
//查询某一个发布定义下的所有发布实例
PageResultList<ReleaseInstance> queryReleaseInstances(String releaseDefinitionId, boolean cascadeReleaseEnvInstance, boolean cascadeEngineStageInstance, int pageIndex, int pageSize)
//获取发布环境的部署日志
BuildLog getReleaseEnvDeployLog(String releaseDefinitionId, String releaseInstanceId, String releaseEnvInstanceId, int start)
发布定义接口关键功能:
1)编辑:创建、修改、克隆、删除发布定义等
2)操作:①启动、终止发布定义等②部署、取消、审批发布环境等
3)查询:①查询发布实例的进度、状态等②查询发布环境实例的进度、状态、日志等
引擎流水线接口
//创建引擎流水线
EnginePipeline createEnginePipeline(EnginePipeline enginePipeline)
//删除引擎流水线
EnginePipeline removeEnginePipeline(String enginePipelineId)
//执行引擎流水线
EnginePipelineInstance executeEnginePipeline(String jobNamePrefix, EnginePipeline enginePipeline, Map<String, Object> pipelineContext)
//获取引擎流水线任务日志
BuildLog getEnginePipelineStageLog(String enginePipelineInstanceId,String engineStageInstanceId, int start)
引擎流水线接口关键功能:
1)编辑:创建、修改、克隆、删除引擎流水线等
2)操作:启动、终止引擎流水线等
3)查询:①查询引擎流水线实例的进度、状态、日志等②查询引擎流水线
任务实例的进度、状态、日志等