Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
go-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
go-gitlab
Commits
ddd10fba
Unverified
Commit
ddd10fba
authored
Jun 28, 2019
by
Sander van Harmelen
Committed by
GitHub
Jun 28, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #647 from sue445/job_duration
Add Duration to Job resource
parents
55fc3081
1ccb1ed4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
18 deletions
+27
-18
jobs.go
jobs.go
+27
-18
No files found.
jobs.go
View file @
ddd10fba
...
...
@@ -35,23 +35,33 @@ type JobsService struct {
//
// GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html
type
Job
struct
{
Commit
*
Commit
`json:"commit"`
C
reatedAt
*
time
.
Time
`json:"created_at
"`
Coverage
float64
`json:"coverag
e"`
ArtifactsFile
struct
{
Filename
string
`json:"filename
"`
Size
int
`json:"size
"`
}
`json:"artifacts_file
"`
FinishedAt
*
time
.
Time
`json:"finished
_at"`
ID
int
`json:"id"`
Name
string
`json:"name"`
Pipeline
struct
{
Commit
*
Commit
`json:"commit"`
C
overage
float64
`json:"coverage
"`
AllowFailure
bool
`json:"allow_failur
e"`
CreatedAt
*
time
.
Time
`json:"created_at"`
StartedAt
*
time
.
Time
`json:"started_at
"`
FinishedAt
*
time
.
Time
`json:"finished_at
"`
Duration
float64
`json:"duration
"`
ArtifactsExpireAt
*
time
.
Time
`json:"artifacts_expire
_at"`
ID
int
`json:"id"`
Name
string
`json:"name"`
Pipeline
struct
{
ID
int
`json:"id"`
Ref
string
`json:"ref"`
Sha
string
`json:"sha"`
Status
string
`json:"status"`
}
`json:"pipeline"`
Ref
string
`json:"ref"`
Ref
string
`json:"ref"`
Artifacts
[]
struct
{
FileType
string
`json:"file_type"`
Filename
string
`json:"filename"`
Size
int
`json:"size"`
FileFormat
string
`json:"file_format"`
}
`json:"artifacts"`
ArtifactsFile
struct
{
Filename
string
`json:"filename"`
Size
int
`json:"size"`
}
`json:"artifacts_file"`
Runner
struct
{
ID
int
`json:"id"`
Description
string
`json:"description"`
...
...
@@ -59,12 +69,11 @@ type Job struct {
IsShared
bool
`json:"is_shared"`
Name
string
`json:"name"`
}
`json:"runner"`
Stage
string
`json:"stage"`
StartedAt
*
time
.
Time
`json:"started_at"`
Status
string
`json:"status"`
Tag
bool
`json:"tag"`
User
*
User
`json:"user"`
WebURL
string
`json:"web_url"`
Stage
string
`json:"stage"`
Status
string
`json:"status"`
Tag
bool
`json:"tag"`
WebURL
string
`json:"web_url"`
User
*
User
`json:"user"`
}
// ListJobsOptions are options for two list apis
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment