2016-09-07 09:27:48 -04:00
|
|
|
- admin = false unless admin
|
|
|
|
- if admin
|
|
|
|
- project = build.project
|
|
|
|
|
2016-07-11 09:38:27 -04:00
|
|
|
%tr.build.commit
|
2016-03-09 10:24:02 -05:00
|
|
|
%td.status
|
|
|
|
- if can?(current_user, :read_build, build)
|
2016-03-15 09:26:15 -04:00
|
|
|
= ci_status_with_icon(build.status, namespace_project_build_url(build.project.namespace, build.project, build))
|
2016-03-09 10:24:02 -05:00
|
|
|
- else
|
|
|
|
= ci_status_with_icon(build.status)
|
|
|
|
|
2016-07-11 09:38:27 -04:00
|
|
|
%td
|
2016-07-11 14:57:12 -04:00
|
|
|
.branch-commit
|
2016-07-11 09:38:27 -04:00
|
|
|
- if can?(current_user, :read_build, build)
|
|
|
|
= link_to namespace_project_build_url(build.project.namespace, build.project, build) do
|
2016-09-07 09:27:48 -04:00
|
|
|
%span.build-link ##{build.id}
|
2016-07-11 09:38:27 -04:00
|
|
|
- else
|
2016-09-07 09:27:48 -04:00
|
|
|
%span.build-link ##{build.id}
|
2016-03-09 10:24:02 -05:00
|
|
|
|
2016-07-11 09:38:27 -04:00
|
|
|
- if defined?(ref) && ref
|
|
|
|
- if build.ref
|
2016-07-22 12:15:14 -04:00
|
|
|
.icon-container
|
|
|
|
= build.tag? ? icon('tag') : icon('code-fork')
|
2016-07-11 09:38:27 -04:00
|
|
|
= link_to build.ref, namespace_project_commits_path(build.project.namespace, build.project, build.ref), class: "monospace branch-name"
|
|
|
|
- else
|
|
|
|
.light none
|
2016-07-20 12:17:52 -04:00
|
|
|
.icon-container
|
|
|
|
= custom_icon("icon_commit")
|
2016-07-11 09:38:27 -04:00
|
|
|
|
|
|
|
- if defined?(commit_sha) && commit_sha
|
|
|
|
= link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "commit-id monospace"
|
|
|
|
|
2016-07-27 12:51:52 -04:00
|
|
|
- if build.stuck?
|
|
|
|
= icon('warning', class: 'text-warning has-tooltip', title: 'Build is stuck. Check runners.')
|
|
|
|
- if defined?(retried) && retried
|
|
|
|
= icon('warning', class: 'text-warning has-tooltip', title: 'Build was retried.')
|
|
|
|
|
2016-07-11 16:36:09 -04:00
|
|
|
.label-container
|
|
|
|
- if build.tags.any?
|
2016-07-11 09:38:27 -04:00
|
|
|
- build.tags.each do |tag|
|
|
|
|
%span.label.label-primary
|
|
|
|
= tag
|
2016-07-11 16:36:09 -04:00
|
|
|
- if build.try(:trigger_request)
|
|
|
|
%span.label.label-info triggered
|
|
|
|
- if build.try(:allow_failure)
|
|
|
|
%span.label.label-danger allowed to fail
|
|
|
|
- if defined?(retried) && retried
|
|
|
|
%span.label.label-warning retried
|
2016-07-16 12:39:58 -04:00
|
|
|
- if build.manual?
|
|
|
|
%span.label.label-info manual
|
2016-03-09 10:24:02 -05:00
|
|
|
|
2016-09-07 09:27:48 -04:00
|
|
|
- if admin
|
|
|
|
%td
|
|
|
|
- if project
|
|
|
|
= link_to project.name_with_namespace, admin_namespace_project_path(project.namespace, project)
|
|
|
|
|
2016-03-09 10:24:02 -05:00
|
|
|
- if defined?(runner) && runner
|
|
|
|
%td
|
|
|
|
- if build.try(:runner)
|
|
|
|
= runner_link(build.runner)
|
|
|
|
- else
|
|
|
|
.light none
|
|
|
|
|
2016-09-01 04:02:01 -04:00
|
|
|
%td
|
2016-09-07 09:27:48 -04:00
|
|
|
= build.stage
|
2016-03-09 10:24:02 -05:00
|
|
|
|
|
|
|
%td
|
2016-09-01 08:09:58 -04:00
|
|
|
= build.name
|
2016-03-09 10:24:02 -05:00
|
|
|
|
2016-05-23 09:47:25 -04:00
|
|
|
%td
|
2016-05-09 19:38:25 -04:00
|
|
|
- if build.duration
|
2016-07-11 09:38:27 -04:00
|
|
|
%p.duration
|
2016-07-11 15:27:35 -04:00
|
|
|
= custom_icon("icon_timer")
|
2016-08-10 10:45:30 -04:00
|
|
|
= duration_in_numbers(build.duration)
|
2016-09-07 09:27:48 -04:00
|
|
|
|
2016-05-09 19:38:25 -04:00
|
|
|
- if build.finished_at
|
2016-07-11 09:38:27 -04:00
|
|
|
%p.finished-at
|
|
|
|
= icon("calendar")
|
|
|
|
%span #{time_ago_with_tooltip(build.finished_at)}
|
2016-03-09 10:24:02 -05:00
|
|
|
|
2016-09-07 09:27:48 -04:00
|
|
|
%td.coverage
|
|
|
|
- if defined?(coverage) && coverage
|
2016-03-09 10:24:02 -05:00
|
|
|
- if build.try(:coverage)
|
|
|
|
#{build.coverage}%
|
|
|
|
|
|
|
|
%td
|
|
|
|
.pull-right
|
|
|
|
- if can?(current_user, :read_build, build) && build.artifacts?
|
2016-04-27 10:46:31 -04:00
|
|
|
= link_to download_namespace_project_build_artifacts_path(build.project.namespace, build.project, build), title: 'Download artifacts', class: 'btn btn-build' do
|
2016-05-09 19:26:13 -04:00
|
|
|
= icon('download')
|
2016-03-09 10:24:02 -05:00
|
|
|
- if can?(current_user, :update_build, build)
|
|
|
|
- if build.active?
|
2016-04-27 10:46:31 -04:00
|
|
|
= link_to cancel_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Cancel', class: 'btn btn-build' do
|
2016-05-09 19:26:13 -04:00
|
|
|
= icon('remove', class: 'cred')
|
2016-07-16 12:39:58 -04:00
|
|
|
- elsif defined?(allow_retry) && allow_retry
|
|
|
|
- if build.retryable?
|
|
|
|
= link_to retry_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Retry', class: 'btn btn-build' do
|
|
|
|
= icon('repeat')
|
2016-09-07 09:27:48 -04:00
|
|
|
- elsif build.playable? && !admin
|
2016-07-16 19:48:51 -04:00
|
|
|
= link_to play_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Play', class: 'btn btn-build' do
|
2016-08-25 17:15:44 -04:00
|
|
|
= custom_icon('icon_play')
|