Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
10b09db4
Commit
10b09db4
authored
Oct 04, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid conflicts between enumlator's schedule! method and state machine's schedule! method
parent
5381985b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+1
-1
app/workers/pipeline_schedule_worker.rb
app/workers/pipeline_schedule_worker.rb
+1
-1
app/workers/run_pipeline_schedule_worker.rb
app/workers/run_pipeline_schedule_worker.rb
+1
-1
spec/workers/pipeline_schedule_worker_spec.rb
spec/workers/pipeline_schedule_worker_spec.rb
+1
-1
spec/workers/run_pipeline_schedule_worker_spec.rb
spec/workers/run_pipeline_schedule_worker_spec.rb
+1
-1
No files found.
app/models/ci/pipeline.rb
View file @
10b09db4
...
...
@@ -63,7 +63,7 @@ module Ci
push:
1
,
web:
2
,
trigger:
3
,
schedule:
4
,
s
ource_s
chedule:
4
,
api:
5
,
external:
6
}
...
...
app/workers/pipeline_schedule_worker.rb
View file @
10b09db4
...
...
@@ -12,7 +12,7 @@ class PipelineScheduleWorker
pipeline
=
Ci
::
CreatePipelineService
.
new
(
schedule
.
project
,
schedule
.
owner
,
ref:
schedule
.
ref
)
.
execute
(
:schedule
,
ignore_skip_ci:
true
,
save_on_errors:
false
,
schedule:
schedule
)
.
execute
(
:s
ource_s
chedule
,
ignore_skip_ci:
true
,
save_on_errors:
false
,
schedule:
schedule
)
schedule
.
deactivate!
unless
pipeline
.
persisted?
rescue
=>
e
...
...
app/workers/run_pipeline_schedule_worker.rb
View file @
10b09db4
...
...
@@ -21,6 +21,6 @@ class RunPipelineScheduleWorker
Ci
::
CreatePipelineService
.
new
(
schedule
.
project
,
user
,
ref:
schedule
.
ref
)
.
execute
(
:schedule
,
ignore_skip_ci:
true
,
save_on_errors:
false
,
schedule:
schedule
)
.
execute
(
:s
ource_s
chedule
,
ignore_skip_ci:
true
,
save_on_errors:
false
,
schedule:
schedule
)
end
end
spec/workers/pipeline_schedule_worker_spec.rb
View file @
10b09db4
...
...
@@ -25,7 +25,7 @@ describe PipelineScheduleWorker do
shared_examples
'successful scheduling'
do
it
'creates a new pipeline'
do
expect
{
subject
}.
to
change
{
project
.
pipelines
.
count
}.
by
(
1
)
expect
(
Ci
::
Pipeline
.
last
).
to
be_schedule
expect
(
Ci
::
Pipeline
.
last
).
to
be_s
ource_s
chedule
pipeline_schedule
.
reload
expect
(
pipeline_schedule
.
next_run_at
).
to
be
>
Time
.
now
...
...
spec/workers/run_pipeline_schedule_worker_spec.rb
View file @
10b09db4
...
...
@@ -30,7 +30,7 @@ describe RunPipelineScheduleWorker do
it
'calls the Service'
do
expect
(
Ci
::
CreatePipelineService
).
to
receive
(
:new
).
with
(
project
,
user
,
ref:
pipeline_schedule
.
ref
).
and_return
(
create_pipeline_service
)
expect
(
create_pipeline_service
).
to
receive
(
:execute
).
with
(
:schedule
,
ignore_skip_ci:
true
,
save_on_errors:
false
,
schedule:
pipeline_schedule
)
expect
(
create_pipeline_service
).
to
receive
(
:execute
).
with
(
:s
ource_s
chedule
,
ignore_skip_ci:
true
,
save_on_errors:
false
,
schedule:
pipeline_schedule
)
worker
.
perform
(
pipeline_schedule
.
id
,
user
.
id
)
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