| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- package seecoder.devcloud.api.jenkins;
- import com.offbytwo.jenkins.model.QueueItem;
- import seecoder.devcloud.api.jenkins.model.BuildDetails;
- import java.io.IOException;
- import java.util.Map;
- public interface JenkinsApi {
- /**
- * 创建一个Job,加载配置模板
- *
- * @param id Job的Id,其实是Result的Id,也就是repo的Id,参照{@link com.moekr.moocoder.logic.service.impl.exam.ExamServiceImpl#join(int, int)}
- * @throws IOException
- */
- void createJob(int id) throws IOException;
- /**
- * 通知构建
- *
- * @param id Job的Id,其实是Result的Id,也就是repo的Id,参照{@link com.moekr.moocoder.logic.service.impl.exam.ExamServiceImpl#join(int, int)}
- * @param paramMap 需要填写的各项参数
- * @return
- * @throws IOException
- */
- QueueItem invokeBuild(int id, Map<String, String> paramMap) throws IOException;
- /**
- * 通知构建
- *
- * @param jobName JobName
- * @param paramMap 需要填写的各项参数
- * @return
- * @throws IOException
- */
- QueueItem invokeBuild(String jobName, Map<String, String> paramMap) throws IOException;
- /**
- * 删除Job
- *
- * @param id Job的Id,其实是Result的Id,也就是repo的Id,参照{@link com.moekr.moocoder.logic.service.impl.exam.ExamServiceImpl#join(int, int)}
- * @throws IOException
- */
- void deleteJob(int id) throws IOException;
- // waitFinished: 是否等待直到构建完全完成
- BuildDetails fetchBuildDetails(int id, int buildNumber, String target, boolean waitFinished) throws IOException;
- BuildDetails fetchBuildDetails(String jobName, int buildNumber, String target, boolean waitFinished) throws IOException;
- void createBuildJob(String jobName) throws IOException;
- void createTestJob(String jobName) throws IOException;
- void createFunctionTestJob(String jobName) throws IOException;
- /**
- * 创建深度学习需要的Job
- *
- * @param jobName Job名称
- */
- void createDLJob(String jobName) throws IOException;
- void deleteJob(String jobName) throws IOException;
- }
|