2016-06-16 23:09:34 +05:30
|
|
|
- status = pipeline.status
|
|
|
|
%tr.commit
|
|
|
|
%td.commit-link
|
2016-09-13 17:45:13 +05:30
|
|
|
= link_to namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id) do
|
|
|
|
- if defined?(status_icon_only) && status_icon_only
|
|
|
|
= ci_icon_for_status(status)
|
|
|
|
- else
|
|
|
|
= ci_status_with_icon(status)
|
2016-06-16 23:09:34 +05:30
|
|
|
%td
|
2016-08-24 12:49:21 +05:30
|
|
|
.branch-commit
|
2016-09-13 17:45:13 +05:30
|
|
|
= link_to namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id) do
|
2016-08-24 12:49:21 +05:30
|
|
|
%span ##{pipeline.id}
|
2016-06-16 23:09:34 +05:30
|
|
|
- if pipeline.ref
|
2016-09-13 17:45:13 +05:30
|
|
|
- unless defined?(hide_branch) && hide_branch
|
|
|
|
.icon-container
|
|
|
|
= pipeline.tag? ? icon('tag') : icon('code-fork')
|
|
|
|
= link_to pipeline.ref, namespace_project_commits_path(pipeline.project.namespace, pipeline.project, pipeline.ref), class: "monospace branch-name"
|
|
|
|
.icon-container
|
|
|
|
= custom_icon("icon_commit")
|
|
|
|
= link_to pipeline.short_sha, namespace_project_commit_path(pipeline.project.namespace, pipeline.project, pipeline.sha), class: "commit-id monospace"
|
2016-08-24 12:49:21 +05:30
|
|
|
- if pipeline.latest?
|
2016-06-16 23:09:34 +05:30
|
|
|
%span.label.label-success.has-tooltip{ title: 'Latest build for this branch' } latest
|
|
|
|
- if pipeline.triggered?
|
|
|
|
%span.label.label-primary triggered
|
|
|
|
- if pipeline.yaml_errors.present?
|
|
|
|
%span.label.label-danger.has-tooltip{ title: "#{pipeline.yaml_errors}" } yaml invalid
|
|
|
|
- if pipeline.builds.any?(&:stuck?)
|
|
|
|
%span.label.label-warning stuck
|
|
|
|
|
|
|
|
%p.commit-title
|
2016-06-22 15:30:34 +05:30
|
|
|
- if commit = pipeline.commit
|
2016-08-24 12:49:21 +05:30
|
|
|
= author_avatar(commit, size: 20)
|
2016-09-13 17:45:13 +05:30
|
|
|
= link_to_gfm truncate(commit.title, length: 60), namespace_project_commit_path(pipeline.project.namespace, pipeline.project, commit.id), class: "commit-row-message"
|
2016-06-16 23:09:34 +05:30
|
|
|
- else
|
|
|
|
Cant find HEAD commit for this branch
|
|
|
|
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
- stages_status = pipeline.statuses.relevant.latest.stages_status
|
2016-09-29 09:46:39 +05:30
|
|
|
%td.stage-cell
|
|
|
|
- stages.each do |stage|
|
2016-06-16 23:09:34 +05:30
|
|
|
- status = stages_status[stage]
|
|
|
|
- tooltip = "#{stage.titleize}: #{status || 'not found'}"
|
|
|
|
- if status
|
2016-09-29 09:46:39 +05:30
|
|
|
.stage-container
|
|
|
|
= link_to namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id, anchor: stage), class: "has-tooltip ci-status-icon-#{status}", title: tooltip do
|
|
|
|
= ci_icon_for_status(status)
|
2016-06-16 23:09:34 +05:30
|
|
|
|
|
|
|
%td
|
2016-09-13 17:45:13 +05:30
|
|
|
- if pipeline.duration
|
2016-06-16 23:09:34 +05:30
|
|
|
%p.duration
|
2016-08-24 12:49:21 +05:30
|
|
|
= custom_icon("icon_timer")
|
2016-09-13 17:45:13 +05:30
|
|
|
= duration_in_numbers(pipeline.duration)
|
2016-08-24 12:49:21 +05:30
|
|
|
- if pipeline.finished_at
|
|
|
|
%p.finished-at
|
|
|
|
= icon("calendar")
|
2016-09-13 17:45:13 +05:30
|
|
|
#{time_ago_with_tooltip(pipeline.finished_at, short_format: false, skip_js: true)}
|
2016-06-16 23:09:34 +05:30
|
|
|
|
2016-08-24 12:49:21 +05:30
|
|
|
%td.pipeline-actions
|
2016-06-16 23:09:34 +05:30
|
|
|
.controls.hidden-xs.pull-right
|
2016-09-13 17:45:13 +05:30
|
|
|
- artifacts = pipeline.builds.latest.with_artifacts_not_expired
|
2016-08-24 12:49:21 +05:30
|
|
|
- actions = pipeline.manual_actions
|
|
|
|
- if artifacts.present? || actions.any?
|
|
|
|
.btn-group.inline
|
|
|
|
- if actions.any?
|
|
|
|
.btn-group
|
|
|
|
%a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'}
|
2016-09-29 09:46:39 +05:30
|
|
|
= custom_icon('icon_play')
|
2016-08-24 12:49:21 +05:30
|
|
|
%b.caret
|
|
|
|
%ul.dropdown-menu.dropdown-menu-align-right
|
|
|
|
- actions.each do |build|
|
|
|
|
%li
|
2016-09-13 17:45:13 +05:30
|
|
|
= link_to play_namespace_project_build_path(pipeline.project.namespace, pipeline.project, build), method: :post, rel: 'nofollow' do
|
2016-09-29 09:46:39 +05:30
|
|
|
= custom_icon('icon_play')
|
2016-08-24 12:49:21 +05:30
|
|
|
%span= build.name.humanize
|
|
|
|
- if artifacts.present?
|
|
|
|
.btn-group
|
|
|
|
%a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'}
|
|
|
|
= icon("download")
|
|
|
|
%b.caret
|
|
|
|
%ul.dropdown-menu.dropdown-menu-align-right
|
|
|
|
- artifacts.each do |build|
|
|
|
|
%li
|
2016-09-13 17:45:13 +05:30
|
|
|
= link_to download_namespace_project_build_artifacts_path(pipeline.project.namespace, pipeline.project, build), rel: 'nofollow' do
|
2016-08-24 12:49:21 +05:30
|
|
|
= icon("download")
|
|
|
|
%span Download '#{build.name}' artifacts
|
2016-06-16 23:09:34 +05:30
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
- if can?(current_user, :update_pipeline, pipeline.project)
|
2016-08-24 12:49:21 +05:30
|
|
|
.cancel-retry-btns.inline
|
|
|
|
- if pipeline.retryable?
|
2016-09-13 17:45:13 +05:30
|
|
|
= link_to retry_namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id), class: 'btn has-tooltip', title: "Retry", method: :post do
|
2016-08-24 12:49:21 +05:30
|
|
|
= icon("repeat")
|
|
|
|
- if pipeline.cancelable?
|
2016-09-13 17:45:13 +05:30
|
|
|
= link_to cancel_namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id), class: 'btn btn-remove has-tooltip', title: "Cancel", method: :post do
|
2016-08-24 12:49:21 +05:30
|
|
|
= icon("remove")
|