BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
94f7595b
Commit
94f7595b
authored
May 17, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define last_pipeline in PipelineScheduleEntity
parent
e9298978
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
pipeline_schedule.rb
app/models/ci/pipeline_schedule.rb
+0
-4
entities.rb
lib/api/entities.rb
+3
-1
No files found.
app/models/ci/pipeline_schedule.rb
View file @
94f7595b
...
...
@@ -44,10 +44,6 @@ module Ci
self
.
next_run_at
=
Gitlab
::
Ci
::
CronParser
.
new
(
cron
,
cron_timezone
).
next_time_from
(
Time
.
now
)
end
def
last_pipeline
self
.
pipelines
&
.
last
end
def
schedule_next_run!
save!
# with set_next_run_at
rescue
ActiveRecord
::
RecordInvalid
...
...
lib/api/entities.rb
View file @
94f7595b
...
...
@@ -690,7 +690,9 @@ module API
expose
:id
expose
:description
,
:ref
,
:cron
,
:cron_timezone
,
:next_run_at
,
:active
expose
:created_at
,
:updated_at
,
:deleted_at
expose
:last_pipeline
,
using:
Entities
::
Pipeline
expose
:last_pipeline
,
using:
Entities
::
Pipeline
do
|
pipeline_schedule
|
pipeline_schedule
.
pipelines
&
.
last
end
expose
:owner
,
using:
Entities
::
UserBasic
end
...
...
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