Commit b888a987 authored by David O'Regan's avatar David O'Regan

Merge branch 'yo-gl-badge-ci' into 'master'

Add gl-badge to CI badges

See merge request gitlab-org/gitlab!51547
parents 0a546adb a572f805
<script> <script>
import { GlTooltipDirective, GlButton, GlLink, GlLoadingIcon } from '@gitlab/ui'; import { GlTooltipDirective, GlButton, GlLink, GlLoadingIcon, GlBadge } from '@gitlab/ui';
import CiStatus from '~/vue_shared/components/ci_icon.vue'; import CiStatus from '~/vue_shared/components/ci_icon.vue';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import { accessValue } from './accessors'; import { accessValue } from './accessors';
...@@ -15,6 +15,7 @@ export default { ...@@ -15,6 +15,7 @@ export default {
GlButton, GlButton,
GlLink, GlLink,
GlLoadingIcon, GlLoadingIcon,
GlBadge,
}, },
inject: { inject: {
dataMethod: { dataMethod: {
...@@ -172,7 +173,9 @@ export default { ...@@ -172,7 +173,9 @@ export default {
</div> </div>
</div> </div>
<div class="gl-pt-2"> <div class="gl-pt-2">
<span class="badge badge-primary" data-testid="downstream-pipeline-label">{{ label }}</span> <gl-badge size="sm" variant="info" data-testid="downstream-pipeline-label">
{{ label }}
</gl-badge>
</div> </div>
<gl-button <gl-button
:id="buttonId" :id="buttonId"
......
...@@ -43,16 +43,16 @@ ...@@ -43,16 +43,16 @@
.label-container .label-container
- if job.tags.any? - if job.tags.any?
- job.tags.each do |tag| - job.tags.each do |tag|
%span.badge.badge-primary %span.badge.badge-pill.gl-badge.sm.badge-primary
= tag = tag
- if job.try(:trigger_request) - if job.try(:trigger_request)
%span.badge.badge-info= _('triggered') %span.badge.badge-pill.gl-badge.sm.badge-info= _('triggered')
- if job.try(:allow_failure) && !job.success? - if job.try(:allow_failure) && !job.success?
%span.badge.badge-warning= _('allowed to fail') %span.badge.badge-pill.gl-badge.sm.badge-warning= _('allowed to fail')
- if job.schedulable? - if job.schedulable?
%span.badge.badge-info= s_('DelayedJobs|delayed') %span.badge.badge-pill.gl-badge.sm.badge-info= s_('DelayedJobs|delayed')
- elsif job.action? - elsif job.action?
%span.badge.badge-info= _('manual') %span.badge.badge-pill.gl-badge.sm.badge-info= _('manual')
- if pipeline_link - if pipeline_link
%td %td
......
...@@ -21,24 +21,24 @@ ...@@ -21,24 +21,24 @@
.icon-container .icon-container
= sprite_icon('flag') = sprite_icon('flag')
- if @pipeline.child? - if @pipeline.child?
%span.js-pipeline-child.badge.badge-primary.has-tooltip{ title: s_("Pipelines|This is a child pipeline within the parent pipeline") } %span.js-pipeline-child.badge.badge-pill.gl-badge.sm.badge-primary.has-tooltip{ title: s_("Pipelines|This is a child pipeline within the parent pipeline") }
= s_('Pipelines|Child pipeline') = s_('Pipelines|Child pipeline')
= surround '(', ')' do = surround '(', ')' do
= link_to s_('Pipelines|parent'), pipeline_path(@pipeline.triggered_by_pipeline), class: 'text-white text-underline' = link_to s_('Pipelines|parent'), pipeline_path(@pipeline.triggered_by_pipeline), class: 'text-white text-underline'
- if @pipeline.latest? - if @pipeline.latest?
%span.js-pipeline-url-latest.badge.badge-success.has-tooltip{ title: _("Latest pipeline for the most recent commit on this branch") } %span.js-pipeline-url-latest.badge.badge-pill.gl-badge.sm.badge-success.has-tooltip{ title: _("Latest pipeline for the most recent commit on this branch") }
latest latest
- if @pipeline.has_yaml_errors? - if @pipeline.has_yaml_errors?
%span.js-pipeline-url-yaml.badge.badge-danger.has-tooltip{ title: @pipeline.yaml_errors } %span.js-pipeline-url-yaml.badge.badge-pill.gl-badge.sm.badge-danger.has-tooltip{ title: @pipeline.yaml_errors }
yaml invalid yaml invalid
- if @pipeline.failure_reason? - if @pipeline.failure_reason?
%span.js-pipeline-url-failure.badge.badge-danger.has-tooltip{ title: @pipeline.failure_reason } %span.js-pipeline-url-failure.badge.badge-pill.gl-badge.sm.badge-danger.has-tooltip{ title: @pipeline.failure_reason }
error error
- if @pipeline.auto_devops_source? - 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: '<b>'.html_safe, b_close: '</b>'.html_safe } - 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: '<b>'.html_safe, b_close: '</b>'.html_safe }
- popover_content_url = help_page_path('topics/autodevops/index.md') - popover_content_url = help_page_path('topics/autodevops/index.md')
- popover_content_text = _('Learn more about Auto DevOps') - popover_content_text = _('Learn more about Auto DevOps')
%a.js-pipeline-url-autodevops.badge.badge-info.autodevops-badge{ href: "#", tabindex: "0", role: "button", data: { container: "body", %a.js-pipeline-url-autodevops.badge.badge-pill.gl-badge.sm.badge-info.autodevops-badge{ href: "#", tabindex: "0", role: "button", data: { container: "body",
toggle: "popover", toggle: "popover",
placement: "top", placement: "top",
html: "true", html: "true",
...@@ -48,10 +48,10 @@ ...@@ -48,10 +48,10 @@
} } } }
Auto DevOps Auto DevOps
- if @pipeline.detached_merge_request_pipeline? - if @pipeline.detached_merge_request_pipeline?
%span.js-pipeline-url-mergerequest.badge.badge-info.has-tooltip{ title: _('Pipelines for merge requests are configured. A detached pipeline runs in the context of the merge request, and not against the merged result. Learn more in the documentation for Pipelines for Merged Results.') } %span.js-pipeline-url-mergerequest.badge.badge-pill.gl-badge.sm.badge-info.has-tooltip{ title: _('Pipelines for merge requests are configured. A detached pipeline runs in the context of the merge request, and not against the merged result. Learn more in the documentation for Pipelines for Merged Results.') }
detached detached
- if @pipeline.stuck? - if @pipeline.stuck?
%span.js-pipeline-url-stuck.badge.badge-warning %span.js-pipeline-url-stuck.badge.badge-pill.gl-badge.sm.badge-warning
stuck stuck
.well-segment.branch-info .well-segment.branch-info
......
---
title: Add gl-badge to CI badges
merge_request: 51547
author: Yogi (@yo)
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment