Show gitlab-ci status on project dashboard
This commit is contained in:
parent
42cf48f59d
commit
72d5a566b4
2 changed files with 13 additions and 0 deletions
|
@ -46,4 +46,12 @@ class GitlabCiService < Service
|
||||||
def build_page sha
|
def build_page sha
|
||||||
project_url + "/builds/#{sha}"
|
project_url + "/builds/#{sha}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def builds_path
|
||||||
|
project_url + "?ref=" + project.default_branch
|
||||||
|
end
|
||||||
|
|
||||||
|
def status_img_path
|
||||||
|
project_url + "/status.png?ref=" + project.default_branch
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -44,3 +44,8 @@
|
||||||
%p
|
%p
|
||||||
Forked from:
|
Forked from:
|
||||||
= link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
|
= link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
|
||||||
|
|
||||||
|
- if @project.gitlab_ci?
|
||||||
|
%hr
|
||||||
|
= link_to @project.gitlab_ci_service.builds_path do
|
||||||
|
= image_tag @project.gitlab_ci_service.status_img_path, alt: "build status"
|
||||||
|
|
Loading…
Reference in a new issue