Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
03ea0194
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,发现更多精彩内容 >>
提交
03ea0194
编写于
8月 04, 2016
作者:
Z
Z.J. van de Weg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CI build status not per environment
上级
b497b0ce
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
24 addition
and
22 deletion
+24
-22
app/views/projects/merge_requests/widget/_heading.html.haml
app/views/projects/merge_requests/widget/_heading.html.haml
+17
-19
spec/models/deployment_spec.rb
spec/models/deployment_spec.rb
+2
-1
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+4
-1
spec/views/projects/merge_requests/_heading.html.haml_spec.rb
.../views/projects/merge_requests/_heading.html.haml_spec.rb
+1
-1
未找到文件。
app/views/projects/merge_requests/widget/_heading.html.haml
浏览文件 @
03ea0194
-
if
@pipeline
.mr-widget-heading
-
@merge_request
.
environments
.
each
do
|
environments
|
-
%w[success success_with_warnings skipped canceled failed running pending]
.
each
do
|
status
|
.ci_widget
{
class:
"ci-#{status}"
,
style:
(
"display:none"
unless
@pipeline
.
status
==
status
)
}
=
ci_icon_for_status
(
status
)
%span
CI build
=
ci_label_for_status
(
status
)
for
-
commit
=
@merge_request
.
diff_head_commit
=
succeed
"."
do
=
link_to
@pipeline
.
short_sha
,
namespace_project_commit_path
(
@merge_request
.
source_project
.
namespace
,
@merge_request
.
source_project
,
@pipeline
.
sha
),
class:
"monospace"
%span
.ci-coverage
=
link_to
"View details"
,
builds_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
"js-show-tab"
,
data:
{
action:
'builds'
}
-
%w[success success_with_warnings skipped canceled failed running pending]
.
each
do
|
status
|
.ci_widget
{
class:
"ci-#{status}"
,
style:
(
"display:none"
unless
@pipeline
.
status
==
status
)
}
=
ci_icon_for_status
(
status
)
%span
CI build
=
ci_label_for_status
(
status
)
for
-
commit
=
@merge_request
.
diff_head_commit
=
succeed
"."
do
=
link_to
@pipeline
.
short_sha
,
namespace_project_commit_path
(
@merge_request
.
source_project
.
namespace
,
@merge_request
.
source_project
,
@pipeline
.
sha
),
class:
"monospace"
%span
.ci-coverage
=
link_to
"View details"
,
builds_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
"js-show-tab"
,
data:
{
action:
'builds'
}
-
elsif
@merge_request
.
has_ci?
-
# Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX
...
...
@@ -48,9 +47,8 @@
.mr-widget-heading
.ci_widget
{
class:
"ci-success"
}
=
ci_icon_for_status
(
"success"
)
%span
Released to
#{
environment
.
name
}
=
succeed
'.'
do
=
time_ago_with_tooltip
(
environment
.
created_at
,
placement:
'bottom'
)
-
if
environment
.
external_url
=
link_to
icon
(
'external-link'
),
environment
.
external_url
%span
.hidden-sm
Released to
#{
environment
.
name
}
.
-
external_url
=
environment
.
external_url
-
if
external_url
=
link_to
icon
(
'external-link'
,
text:
"View on
#{
external_url
.
gsub
(
/\A.*?:\/\//
,
''
)
}
"
),
external_url
spec/models/deployment_spec.rb
浏览文件 @
03ea0194
...
...
@@ -20,7 +20,8 @@ describe Deployment, models: true do
let
(
:project
)
{
create
(
:project
)
}
let
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let
(
:deployment
)
do
create
(
:deployment
,
environment:
environment
,
sha:
'5f923865dde3436854e9ceb9cdb7815618d4e849'
)
create
(
:deployment
,
environment:
environment
,
sha:
'5f923865dde3436854e9ceb9cdb7815618d4e849'
)
end
context
'when there is no project commit'
do
...
...
spec/models/merge_request_spec.rb
浏览文件 @
03ea0194
...
...
@@ -677,7 +677,10 @@ describe MergeRequest, models: true do
describe
"#environments"
do
let
(
:project
)
{
create
(
:project
)
}
let!
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
,
sha:
'5f923865dde3436854e9ceb9cdb7815618d4e849'
)
}
let!
(
:deployment
)
do
create
(
:deployment
,
environment:
environment
,
sha:
'5f923865dde3436854e9ceb9cdb7815618d4e849'
)
end
let!
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let!
(
:environment1
)
{
create
(
:environment
,
project:
project
)
}
...
...
spec/views/projects/merge_requests/_heading.html.haml_spec.rb
浏览文件 @
03ea0194
...
...
@@ -19,7 +19,7 @@ describe 'projects/merge_requests/widget/_heading' do
end
it
'displays that the environment is deployed'
do
expect
(
rendered
).
to
match
(
'Released to'
)
expect
(
rendered
).
to
match
(
"Released to
#{
environment
.
name
}
"
)
end
end
end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录