Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions src/main/java/org/gitlab4j/api/models/Job.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class Job {
private Boolean manual;
private Boolean allowFailure;
private Float duration;
private Float queuedDuration;
private Project project;

public Long getId() {
Expand Down Expand Up @@ -206,11 +207,18 @@ public Float getDuration() {
public void setDuration(Float duration) {
this.duration = duration;
}


public Float getQueuedDuration() {
return queuedDuration;
}

public void setQueuedDuration(Float queuedDuration) {
this.queuedDuration = queuedDuration;
}

public Project getProject() {
return project;
}

public void setProject(Project project) {
this.project = project;
}
Expand Down Expand Up @@ -304,12 +312,16 @@ public Job withAllowFailure(Boolean allowFailure) {
this.allowFailure = allowFailure;
return this;
}

public Job withDuration(Float duration) {
this.duration = duration;
return this;
}


public Job withQueuedDuration(Float queuedDuration) {
this.queuedDuration = queuedDuration;
return this;
}

public Job withProject(Project project) {
this.project = project;
return this;
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/org/gitlab4j/api/models/Pipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class Pipeline {
private Date committedAt;
private String coverage;
private Integer duration;
private Float queuedDuration;
private String webUrl;
private DetailedStatus detailedStatus;

Expand Down Expand Up @@ -225,6 +226,14 @@ public void setDuration(Integer duration) {
this.duration = duration;
}

public Float getQueuedDuration() {
return queuedDuration;
}

public void setQueuedDuration(Float queuedDuration) {
this.queuedDuration = queuedDuration;
}

public String getWebUrl() {
return webUrl;
}
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public static class ObjectAttributes {
private Date createdAt;
private Date finishedAt;
private Integer duration;
private Float queuedDuration;
private List<Variable> variables;

public Long getId() {
Expand Down Expand Up @@ -171,6 +172,14 @@ public void setDuration(Integer duration) {
this.duration = duration;
}

public Float getQueuedDuration() {
return queuedDuration;
}

public void setQueuedDuration(Float queuedDuration) {
this.queuedDuration = queuedDuration;
}

public List<Variable> getVariables() {
return variables;
}
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/org/gitlab4j/api/job.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"web_url": "https://example.com/foo/bar/-/jobs/7",
"allow_failure": false,
"duration": 0.465,
"queued_duration": 0.010,
"user": {
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
"created_at": "2015-12-21T13:14:24.077Z",
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/org/gitlab4j/api/pipeline-event.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"created_at": "2016-08-12T15:23:28Z",
"finished_at": "2016-08-12T15:26:29Z",
"duration": 63,
"queued_duration": 0.010,
"variables": [
{
"key": "NESTOR_PROD_ENVIRONMENT",
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/org/gitlab4j/api/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"updated_at": "2016-08-11T11:32:35.169Z",
"finished_at": "2016-08-11T11:32:35.145Z",
"coverage": "30.0",
"queued_duration": 0.010,
"detailed_status": {
"icon": "status_pending",
"text": "pending",
Expand All @@ -28,4 +29,4 @@
"details_path": "/gitlab4j/test-project/pipelines/66",
"favicon": "/assets/ci_favicons/favicon_status_pending-5bdf338420e5221ca24353b6bff1c9367189588750632e9a871b7af09ff6a2ae.png"
}
}
}