2016-06-03 10:27:50 -04:00
|
|
|
- if @pipeline
|
2015-10-16 10:39:31 -04:00
|
|
|
.mr-widget-heading
|
2017-03-07 06:10:27 -05:00
|
|
|
- %w[success success_with_warnings skipped manual canceled failed running pending].each do |status|
|
2017-01-14 10:27:50 -05:00
|
|
|
.ci_widget{ class: "ci-#{status}", style: ("display:none" unless @pipeline.status == status) }
|
2017-02-28 13:11:55 -05:00
|
|
|
%div{ class: "ci-status-icon ci-status-icon-#{status}" }
|
2017-01-14 10:27:50 -05:00
|
|
|
= link_to namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), class: 'icon-link' do
|
|
|
|
= ci_icon_for_status(status)
|
2016-08-04 05:29:41 -04:00
|
|
|
%span
|
2016-09-13 21:38:02 -04:00
|
|
|
Pipeline
|
|
|
|
= link_to "##{@pipeline.id}", namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), class: 'pipeline'
|
2016-08-04 05:29:41 -04:00
|
|
|
= ci_label_for_status(status)
|
2017-02-10 10:49:17 -05:00
|
|
|
- if @pipeline.stages.any?
|
|
|
|
.mr-widget-pipeline-graph
|
|
|
|
= render 'shared/mini_pipeline_graph', pipeline: @pipeline, klass: 'js-pipeline-inline-mr-widget-graph'
|
2017-01-14 10:27:50 -05:00
|
|
|
%span
|
|
|
|
for
|
|
|
|
= succeed "." do
|
|
|
|
= link_to @pipeline.short_sha, namespace_project_commit_path(@merge_request.source_project.namespace, @merge_request.source_project, @pipeline.sha), class: "monospace js-commit-link"
|
2016-08-04 05:29:41 -04:00
|
|
|
%span.ci-coverage
|
2016-03-21 05:52:38 -04:00
|
|
|
|
|
|
|
- elsif @merge_request.has_ci?
|
2017-01-16 09:57:33 -05:00
|
|
|
-# Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX
|
|
|
|
-# TODO, remove in later versions when services like Jenkins will set CI status via Commit status API
|
2016-03-21 05:52:38 -04:00
|
|
|
.mr-widget-heading
|
2015-12-08 16:26:29 -05:00
|
|
|
- %w[success skipped canceled failed running pending].each do |status|
|
2016-12-26 05:47:16 -05:00
|
|
|
.ci_widget{ class: "ci-#{status} ci-status-icon-#{status}", style: "display:none" }
|
2015-12-08 16:26:29 -05:00
|
|
|
= ci_icon_for_status(status)
|
|
|
|
%span
|
2017-01-26 06:52:58 -05:00
|
|
|
CI job
|
2015-12-08 16:26:29 -05:00
|
|
|
= ci_label_for_status(status)
|
2017-02-16 08:34:45 -05:00
|
|
|
for
|
2016-06-20 12:48:04 -04:00
|
|
|
- commit = @merge_request.diff_head_commit
|
2015-12-08 07:04:47 -05:00
|
|
|
= succeed "." do
|
|
|
|
= link_to commit.short_id, namespace_project_commit_path(@merge_request.source_project.namespace, @merge_request.source_project, commit), class: "monospace"
|
2015-08-07 09:17:10 -04:00
|
|
|
%span.ci-coverage
|
2015-06-11 03:40:26 -04:00
|
|
|
|
2016-03-21 05:52:38 -04:00
|
|
|
.ci_widget
|
|
|
|
= icon("spinner spin")
|
2016-06-20 12:48:04 -04:00
|
|
|
Checking CI status for #{@merge_request.diff_head_commit.short_id}…
|
2016-03-21 05:52:38 -04:00
|
|
|
|
2016-12-26 05:47:16 -05:00
|
|
|
.ci_widget.ci-not_found{ style: "display:none" }
|
2016-03-21 05:52:38 -04:00
|
|
|
= icon("times-circle")
|
2016-06-20 12:48:04 -04:00
|
|
|
Could not find CI status for #{@merge_request.diff_head_commit.short_id}.
|
2016-03-21 05:52:38 -04:00
|
|
|
|
2016-12-26 05:47:16 -05:00
|
|
|
.ci_widget.ci-error{ style: "display:none" }
|
2016-03-21 05:52:38 -04:00
|
|
|
= icon("times-circle")
|
2016-06-20 12:48:04 -04:00
|
|
|
Could not connect to the CI server. Please check your settings and try again.
|
2016-08-02 08:01:22 -04:00
|
|
|
|
2016-10-04 12:50:25 -04:00
|
|
|
.js-success-icon.hidden
|
|
|
|
= ci_icon_for_status('success')
|