Commit 32c31a5b authored by Jeremie Bresson's avatar Jeremie Bresson
Browse files

Merge remote-tracking branch 'origin/main' into 6.x

parents ffc29df7 346a02a0
...@@ -10,6 +10,7 @@ import jakarta.ws.rs.core.GenericType; ...@@ -10,6 +10,7 @@ import jakarta.ws.rs.core.GenericType;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import org.gitlab4j.api.models.Bridge; import org.gitlab4j.api.models.Bridge;
import org.gitlab4j.api.models.Job;
import org.gitlab4j.api.models.Pipeline; import org.gitlab4j.api.models.Pipeline;
import org.gitlab4j.api.models.PipelineFilter; import org.gitlab4j.api.models.PipelineFilter;
import org.gitlab4j.api.models.PipelineSchedule; import org.gitlab4j.api.models.PipelineSchedule;
...@@ -858,6 +859,35 @@ public class PipelineApi extends AbstractApi implements Constants { ...@@ -858,6 +859,35 @@ public class PipelineApi extends AbstractApi implements Constants {
return (getPipelineVariables(projectIdOrPath, pipelineId, getDefaultPerPage()).stream()); return (getPipelineVariables(projectIdOrPath, pipelineId, getDefaultPerPage()).stream());
} }
/**
* Get a List of bridges in a pipeline.
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_id/bridges </code></pre>
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the pipelines for
* @param pipelineId the pipeline ID to get the list of bridges for
* @return a list containing the bridges for the specified project ID and pipeline ID
* @throws GitLabApiException if any exception occurs during execution
*/
public List<Bridge> getBridgesForPipeline(Object projectIdOrPath, long pipelineId) throws GitLabApiException {
return (getBridgesForPipeline(projectIdOrPath, pipelineId, getDefaultPerPage(), null).all());
}
/**
* Get a List of bridges in a pipeline.
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_id/bridges </code></pre>
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the pipelines for
* @param pipelineId the pipeline ID to get the list of bridges for
* @param scope the scope of the jobs to list
* @return a list containing the bridges for the specified project ID and pipeline ID
* @throws GitLabApiException if any exception occurs during execution
*/
public List<Bridge> getBridgesForPipeline(Object projectIdOrPath, long pipelineId, JobScope scope) throws GitLabApiException {
return (getBridgesForPipeline(projectIdOrPath, pipelineId, getDefaultPerPage(), scope).all());
}
/** /**
* Get a Pager of bridges in a pipeline. * Get a Pager of bridges in a pipeline.
* *
...@@ -866,6 +896,7 @@ public class PipelineApi extends AbstractApi implements Constants { ...@@ -866,6 +896,7 @@ public class PipelineApi extends AbstractApi implements Constants {
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the pipelines for * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the pipelines for
* @param pipelineId the pipeline ID to get the list of bridges for * @param pipelineId the pipeline ID to get the list of bridges for
* @param itemsPerPage the number of Bridge instances that will be fetched per page * @param itemsPerPage the number of Bridge instances that will be fetched per page
* @param scope the scope of the jobs to list
* @return a list containing the bridges for the specified project ID and pipeline ID * @return a list containing the bridges for the specified project ID and pipeline ID
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
......
...@@ -16,7 +16,7 @@ public class Bridge implements Serializable { ...@@ -16,7 +16,7 @@ public class Bridge implements Serializable {
private Date erasedAt; private Date erasedAt;
private Double duration; private Double duration;
private Double queuedDuration; private Double queuedDuration;
private int id; private Long id;
private String name; private String name;
private String coverage; private String coverage;
private Pipeline pipeline; private Pipeline pipeline;
...@@ -92,11 +92,11 @@ public class Bridge implements Serializable { ...@@ -92,11 +92,11 @@ public class Bridge implements Serializable {
this.queuedDuration = queuedDuration; this.queuedDuration = queuedDuration;
} }
public int getId() { public Long getId() {
return id; return id;
} }
public void setId(int id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
......
...@@ -8,7 +8,7 @@ import java.util.Date; ...@@ -8,7 +8,7 @@ import java.util.Date;
public class DownstreamPipeline implements Serializable { public class DownstreamPipeline implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private int id; private Long id;
private String sha; private String sha;
private String ref; private String ref;
private String status; private String status;
...@@ -16,11 +16,11 @@ public class DownstreamPipeline implements Serializable { ...@@ -16,11 +16,11 @@ public class DownstreamPipeline implements Serializable {
private Date updatedAt; private Date updatedAt;
private String webUrl; private String webUrl;
public int getId() { public Long getId() {
return id; return id;
} }
public void setId(int id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment