Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
f84db3cc
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f84db3cc
编写于
10月 04, 2018
作者:
S
Shinya Maeda
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Avoid conflicts between enumlator's schedule! method and state machine's schedule! method"
This reverts commit
10b09db4
.
上级
10b09db4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
5 addition
and
5 deletion
+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
未找到文件。
app/models/ci/pipeline.rb
浏览文件 @
f84db3cc
...
...
@@ -63,7 +63,7 @@ module Ci
push:
1
,
web:
2
,
trigger:
3
,
s
ource_s
chedule:
4
,
schedule:
4
,
api:
5
,
external:
6
}
...
...
app/workers/pipeline_schedule_worker.rb
浏览文件 @
f84db3cc
...
...
@@ -12,7 +12,7 @@ class PipelineScheduleWorker
pipeline
=
Ci
::
CreatePipelineService
.
new
(
schedule
.
project
,
schedule
.
owner
,
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?
rescue
=>
e
...
...
app/workers/run_pipeline_schedule_worker.rb
浏览文件 @
f84db3cc
...
...
@@ -21,6 +21,6 @@ class RunPipelineScheduleWorker
Ci
::
CreatePipelineService
.
new
(
schedule
.
project
,
user
,
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
spec/workers/pipeline_schedule_worker_spec.rb
浏览文件 @
f84db3cc
...
...
@@ -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_s
ource_s
chedule
expect
(
Ci
::
Pipeline
.
last
).
to
be_schedule
pipeline_schedule
.
reload
expect
(
pipeline_schedule
.
next_run_at
).
to
be
>
Time
.
now
...
...
spec/workers/run_pipeline_schedule_worker_spec.rb
浏览文件 @
f84db3cc
...
...
@@ -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
(
: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
)
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录