2016-04-12 10:16:39 -04:00
|
|
|
- status = commit.status
|
|
|
|
%tr.commit
|
|
|
|
%td.commit-link
|
2016-04-13 07:01:08 -04:00
|
|
|
= link_to namespace_project_pipeline_path(@project.namespace, @project, commit.id), class: "ci-status ci-#{status}" do
|
2016-04-12 10:16:39 -04:00
|
|
|
= ci_icon_for_status(status)
|
|
|
|
%strong ##{commit.id}
|
|
|
|
|
|
|
|
%td
|
2016-04-13 07:01:08 -04:00
|
|
|
%div.branch-commit
|
2016-04-12 10:16:39 -04:00
|
|
|
- if commit.ref
|
2016-04-13 07:01:08 -04:00
|
|
|
= link_to commit.ref, namespace_project_commits_path(@project.namespace, @project, commit.ref), class: "monospace"
|
|
|
|
·
|
|
|
|
= link_to commit.short_sha, namespace_project_commit_path(@project.namespace, @project, commit.sha), class: "commit-id monospace"
|
2016-04-12 10:16:39 -04:00
|
|
|
|
2016-04-13 07:01:08 -04:00
|
|
|
- if commit.latest?
|
|
|
|
%span.label.label-success latest
|
2016-04-12 10:16:39 -04:00
|
|
|
- if commit.tag?
|
|
|
|
%span.label.label-primary tag
|
2016-04-12 13:57:22 -04:00
|
|
|
- if commit.triggered?
|
2016-04-12 10:16:39 -04:00
|
|
|
%span.label.label-primary triggered
|
|
|
|
- if commit.yaml_errors.present?
|
|
|
|
%span.label.label-danger.has-tooltip(title="#{commit.yaml_errors}") yaml invalid
|
|
|
|
- if commit.builds.any?(&:stuck?)
|
|
|
|
%span.label.label-warning stuck
|
|
|
|
|
2016-04-13 07:01:08 -04:00
|
|
|
%p
|
|
|
|
%span
|
|
|
|
- if commit_data = commit.commit_data
|
|
|
|
= link_to_gfm commit_data.title, namespace_project_commit_path(@project.namespace, @project, commit_data.id), class: "commit-row-message"
|
|
|
|
- else
|
|
|
|
Cant find HEAD commit for this branch
|
|
|
|
|
2016-04-12 10:16:39 -04:00
|
|
|
|
2016-04-12 13:57:22 -04:00
|
|
|
- stages_status = commit.statuses.stages_status
|
2016-04-12 10:16:39 -04:00
|
|
|
- stages.each do |stage|
|
|
|
|
%td
|
2016-04-12 13:57:22 -04:00
|
|
|
- if status = stages_status[stage]
|
2016-05-09 16:39:48 -04:00
|
|
|
- tooltip = "#{stage.titleize}: #{status}"
|
|
|
|
%span.has-tooltip(title="#{tooltip}"){class: "ci-status-icon-#{status}"}
|
2016-04-12 13:57:22 -04:00
|
|
|
= ci_icon_for_status(status)
|
2016-04-12 10:16:39 -04:00
|
|
|
|
|
|
|
%td
|
|
|
|
- if commit.started_at && commit.finished_at
|
|
|
|
%p
|
2016-04-13 07:01:08 -04:00
|
|
|
%i.fa.fa-clock-o
|
|
|
|
|
2016-04-12 10:16:39 -04:00
|
|
|
#{duration_in_words(commit.finished_at, commit.started_at)}
|
|
|
|
- if commit.finished_at
|
|
|
|
%p
|
2016-04-13 07:01:08 -04:00
|
|
|
%i.fa.fa-calendar
|
|
|
|
|
2016-04-12 10:16:39 -04:00
|
|
|
#{time_ago_with_tooltip(commit.finished_at)}
|
|
|
|
|
2016-04-13 07:01:08 -04:00
|
|
|
%td
|
2016-04-12 10:16:39 -04:00
|
|
|
.controls.hidden-xs.pull-right
|
2016-05-09 16:39:48 -04:00
|
|
|
- artifacts = commit.builds.latest.select { |b| b.artifacts? }
|
2016-04-12 10:16:39 -04:00
|
|
|
- if artifacts.present?
|
|
|
|
.dropdown.inline
|
|
|
|
%button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
|
|
|
|
= icon('download')
|
|
|
|
%b.caret
|
|
|
|
%ul.dropdown-menu.dropdown-menu-align-right
|
|
|
|
- artifacts.each do |build|
|
|
|
|
%li
|
|
|
|
= link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, build), rel: 'nofollow' do
|
|
|
|
%i.fa.fa-download
|
|
|
|
%span #{build.name}
|
|
|
|
|
|
|
|
- if can?(current_user, :update_pipeline, @project)
|
2016-05-09 16:39:48 -04:00
|
|
|
|
2016-04-13 07:01:08 -04:00
|
|
|
- if commit.retryable? && commit.builds.failed.any?
|
2016-04-12 13:57:22 -04:00
|
|
|
= link_to retry_namespace_project_pipeline_path(@project.namespace, @project, commit.id), class: 'btn has-tooltip', title: "Retry", method: :post do
|
2016-04-12 10:16:39 -04:00
|
|
|
= icon("repeat")
|
|
|
|
|
|
|
|
- if commit.active?
|
2016-04-12 13:57:22 -04:00
|
|
|
= link_to cancel_namespace_project_pipeline_path(@project.namespace, @project, commit.id), class: 'btn btn-remove has-tooltip', title: "Cancel", method: :post do
|
2016-04-12 10:16:39 -04:00
|
|
|
= icon("remove cred")
|