use of org.gitlab4j.api.models.Job in project choerodon-starters by open-hand.
the class JobApi method playJob.
/**
* Play specified job in a project.
* <p>
* POST /projects/:id/jobs/:job_id/play
*
* @param projectId the project ID to play specified job
* @param jobId the ID to play job
* @return job instance which just played
* @throws GitLabApiException if any exception occurs during execution
*/
public Job playJob(int projectId, int jobId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Status.OK, formData, "projects", projectId, "jobs", jobId, "play");
return (response.readEntity(Job.class));
}
use of org.gitlab4j.api.models.Job in project choerodon-starters by open-hand.
the class JobApi method cancleJob.
/**
* Cancel specified job in a project.
* <p>
* POST /projects/:id/jobs/:job_id/cancel
*
* @param projectId the project ID to cancel specified job
* @param jobId the ID to cancel job
* @return job instance which just canceled
* @throws GitLabApiException if any exception occurs during execution
*/
public Job cancleJob(int projectId, int jobId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Status.CREATED, formData, "projects", projectId, "jobs", jobId, "cancel");
return (response.readEntity(Job.class));
}
use of org.gitlab4j.api.models.Job in project choerodon-starters by open-hand.
the class JobApi method retryJob.
/**
* Retry specified job in a project.
* <p>
* POST /projects/:id/jobs/:job_id/retry
*
* @param projectId the project ID to retry speficied job
* @param jobId the ID to retry job
* @return job instance which just retried
* @throws GitLabApiException if any exception occurs during execution
*/
public Job retryJob(int projectId, int jobId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Status.CREATED, formData, "projects", projectId, "jobs", jobId, "retry");
return (response.readEntity(Job.class));
}
Aggregations