- if @pipeline.name .gl-border-t.gl-p-5.gl-px-0 %h3.gl-m-0.gl-text-body = @pipeline.name - else .commit-box %h3.commit-title = markdown(commit.title, pipeline: :single_line) - if commit.description.present? %pre.commit-description< = preserve(markdown(commit.description, pipeline: :single_line)) .info-well .well-segment.pipeline-info{ class: "gl-align-items-baseline! gl-flex-direction-column" } %div .icon-container = sprite_icon('clock', css_class: 'gl-top-0!') = n_('%d job', '%d jobs', @pipeline.total_size) % @pipeline.total_size = @pipeline.ref_text - if @pipeline.finished_at - duration = time_interval_in_words(@pipeline.duration) - queued_duration = time_interval_in_words(@pipeline.queued_duration) %span.gl-pl-7{ 'data-testid': 'pipeline-stats-text' } - if Feature.enabled?(:refactor_ci_minutes_consumption, @project) = render_if_exists 'projects/pipelines/pipeline_stats_text', duration: duration, pipeline: @pipeline, queued_duration: queued_duration - else = s_("in %{duration} and was queued for %{queued_duration}").html_safe % { duration: duration, queued_duration: queued_duration } - if has_pipeline_badges?(@pipeline) .well-segment .icon-container = sprite_icon('flag', css_class: 'gl-top-0!') - if @pipeline.schedule? = gl_badge_tag _('Scheduled'), { variant: :info, size: :sm }, { class: 'js-pipeline-url-scheduled', title: _('This pipeline was triggered by a schedule.') } - if @pipeline.child? - text = sprintf(s_('Pipelines|Child pipeline (%{link_start}parent%{link_end})'), { link_start: "", link_end: ""}).html_safe = gl_badge_tag text, { variant: :info, size: :sm }, { class: 'js-pipeline-child has-tooltip', title: s_("Pipelines|This is a child pipeline within the parent pipeline") } - if @pipeline.latest? = gl_badge_tag s_('Pipelines|latest'), { variant: :success, size: :sm }, { class: 'js-pipeline-url-latest has-tooltip', title: _("Latest pipeline for the most recent commit on this branch") } - if @pipeline.merge_train_pipeline? = gl_badge_tag s_('Pipelines|merge train'), { variant: :info, size: :sm }, { class: 'js-pipeline-url-train has-tooltip', title: s_("Pipelines|This pipeline ran on the contents of this merge request combined with the contents of all other merge requests queued for merging into the target branch.") } - if @pipeline.has_yaml_errors? = gl_badge_tag s_('Pipelines|yaml invalid'), { variant: :danger, size: :sm }, { class: 'js-pipeline-url-yaml has-tooltip', title: @pipeline.yaml_errors } - if @pipeline.failure_reason? = gl_badge_tag s_('Pipelines|error'), { variant: :danger, size: :sm }, { class: 'js-pipeline-url-failure has-tooltip', title: @pipeline.failure_reason } - if @pipeline.auto_devops_source? - popover_title_text = html_escape(_('This pipeline makes use of a predefined CI/CD configuration enabled by %{b_open}Auto DevOps.%{b_close}')) % { b_open: ''.html_safe, b_close: ''.html_safe } - popover_content_url = help_page_path('topics/autodevops/index.md') - popover_content_text = _('Learn more about Auto DevOps') = gl_badge_tag s_('Pipelines|Auto DevOps'), { variant: :info, size: :sm }, { class: 'js-pipeline-url-autodevops', href: "#", tabindex: "0", role: "button", data: { container: 'body', toggle: 'popover', placement: 'top', html: 'true', triggers: 'focus', title: "