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
Léo-Paul Géneau
gitlab-ce
Commits
f84db3cc
Commit
f84db3cc
authored
Oct 04, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Avoid conflicts between enumlator's schedule! method and state machine's schedule! method"
This reverts commit
10b09db4
.
parent
10b09db4
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 @
f84db3cc
...
@@ -63,7 +63,7 @@ module Ci
...
@@ -63,7 +63,7 @@ module Ci
push:
1
,
push:
1
,
web:
2
,
web:
2
,
trigger:
3
,
trigger:
3
,
s
ource_s
chedule:
4
,
schedule:
4
,
api:
5
,
api:
5
,
external:
6
external:
6
}
}
...
...
app/workers/pipeline_schedule_worker.rb
View file @
f84db3cc
...
@@ -12,7 +12,7 @@ class PipelineScheduleWorker
...
@@ -12,7 +12,7 @@ class PipelineScheduleWorker
pipeline
=
Ci
::
CreatePipelineService
.
new
(
schedule
.
project
,
pipeline
=
Ci
::
CreatePipelineService
.
new
(
schedule
.
project
,
schedule
.
owner
,
schedule
.
owner
,
ref:
schedule
.
ref
)
ref:
schedule
.
ref
)
.
execute
(
:s
ource_s
chedule
,
ignore_skip_ci:
true
,
save_on_errors:
false
,
schedule:
schedule
)
.
execute
(
:schedule
,
ignore_skip_ci:
true
,
save_on_errors:
false
,
schedule:
schedule
)
schedule
.
deactivate!
unless
pipeline
.
persisted?
schedule
.
deactivate!
unless
pipeline
.
persisted?
rescue
=>
e
rescue
=>
e
...
...
app/workers/run_pipeline_schedule_worker.rb
View file @
f84db3cc
...
@@ -21,6 +21,6 @@ class RunPipelineScheduleWorker
...
@@ -21,6 +21,6 @@ class RunPipelineScheduleWorker
Ci
::
CreatePipelineService
.
new
(
schedule
.
project
,
Ci
::
CreatePipelineService
.
new
(
schedule
.
project
,
user
,
user
,
ref:
schedule
.
ref
)
ref:
schedule
.
ref
)
.
execute
(
:s
ource_s
chedule
,
ignore_skip_ci:
true
,
save_on_errors:
false
,
schedule:
schedule
)
.
execute
(
:schedule
,
ignore_skip_ci:
true
,
save_on_errors:
false
,
schedule:
schedule
)
end
end
end
end
spec/workers/pipeline_schedule_worker_spec.rb
View file @
f84db3cc
...
@@ -25,7 +25,7 @@ describe PipelineScheduleWorker do
...
@@ -25,7 +25,7 @@ describe PipelineScheduleWorker do
shared_examples
'successful scheduling'
do
shared_examples
'successful scheduling'
do
it
'creates a new pipeline'
do
it
'creates a new pipeline'
do
expect
{
subject
}.
to
change
{
project
.
pipelines
.
count
}.
by
(
1
)
expect
{
subject
}.
to
change
{
project
.
pipelines
.
count
}.
by
(
1
)
expect
(
Ci
::
Pipeline
.
last
).
to
be_s
ource_s
chedule
expect
(
Ci
::
Pipeline
.
last
).
to
be_schedule
pipeline_schedule
.
reload
pipeline_schedule
.
reload
expect
(
pipeline_schedule
.
next_run_at
).
to
be
>
Time
.
now
expect
(
pipeline_schedule
.
next_run_at
).
to
be
>
Time
.
now
...
...
spec/workers/run_pipeline_schedule_worker_spec.rb
View file @
f84db3cc
...
@@ -30,7 +30,7 @@ describe RunPipelineScheduleWorker do
...
@@ -30,7 +30,7 @@ describe RunPipelineScheduleWorker do
it
'calls the Service'
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
(
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
(
:s
ource_s
chedule
,
ignore_skip_ci:
true
,
save_on_errors:
false
,
schedule:
pipeline_schedule
)
expect
(
create_pipeline_service
).
to
receive
(
:execute
).
with
(
:schedule
,
ignore_skip_ci:
true
,
save_on_errors:
false
,
schedule:
pipeline_schedule
)
worker
.
perform
(
pipeline_schedule
.
id
,
user
.
id
)
worker
.
perform
(
pipeline_schedule
.
id
,
user
.
id
)
end
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