Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pipeline_config_reference_card.vue « cards « drawer « components « pipeline_editor « ci « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bc9203b9c5b2f69d1c4f745420097bbd1285f59b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<script>
import { GlLink, GlSprintf } from '@gitlab/ui';
import { s__ } from '~/locale';
import Tracking from '~/tracking';
import {
  CI_EXAMPLES_LINK,
  CI_HELP_LINK,
  CI_NEEDS_LINK,
  CI_YAML_LINK,
  pipelineEditorTrackingOptions,
} from '../../../constants';

export default {
  CI_EXAMPLES_LINK,
  CI_HELP_LINK,
  CI_NEEDS_LINK,
  CI_YAML_LINK,
  i18n: {
    title: s__('PipelineEditorTutorial|⚙️ Pipeline configuration reference'),
    firstParagraph: s__('PipelineEditorTutorial|Resources to help with your CI/CD configuration:'),
    browseExamples: s__(
      'PipelineEditorTutorial|Browse %{linkStart}CI/CD examples and templates%{linkEnd}',
    ),
    viewSyntaxRef: s__(
      'PipelineEditorTutorial|View %{linkStart}.gitlab-ci.yml syntax reference%{linkEnd}',
    ),
    learnMore: s__(
      'PipelineEditorTutorial|Learn more about %{linkStart}GitLab CI/CD concepts%{linkEnd}',
    ),
    needs: s__(
      'PipelineEditorTutorial|Make your pipeline more efficient with the %{linkStart}Needs keyword%{linkEnd}',
    ),
  },
  components: {
    GlLink,
    GlSprintf,
  },
  mixins: [Tracking.mixin()],
  inject: ['ciExamplesHelpPagePath', 'ciHelpPagePath', 'needsHelpPagePath', 'ymlHelpPagePath'],
  methods: {
    trackHelpPageClick(key) {
      const { label, actions } = pipelineEditorTrackingOptions;
      this.track(actions.helpDrawerLinks[key], { label });
    },
  },
};
</script>
<template>
  <div>
    <h3 class="gl-font-lg gl-mt-0 gl-mb-5">{{ $options.i18n.title }}</h3>
    <p class="gl-mb-3">{{ $options.i18n.firstParagraph }}</p>
    <ul>
      <li>
        <gl-sprintf :message="$options.i18n.browseExamples">
          <template #link="{ content }">
            <gl-link
              :href="ciExamplesHelpPagePath"
              target="_blank"
              @click="trackHelpPageClick($options.CI_EXAMPLES_LINK)"
            >
              {{ content }}
            </gl-link>
          </template>
        </gl-sprintf>
      </li>
      <li>
        <gl-sprintf :message="$options.i18n.viewSyntaxRef">
          <template #link="{ content }">
            <gl-link
              :href="ymlHelpPagePath"
              target="_blank"
              @click="trackHelpPageClick($options.CI_YAML_LINK)"
            >
              {{ content }}
            </gl-link>
          </template>
        </gl-sprintf>
      </li>
      <li>
        <gl-sprintf :message="$options.i18n.learnMore">
          <template #link="{ content }">
            <gl-link
              :href="ciHelpPagePath"
              target="_blank"
              @click="trackHelpPageClick($options.CI_HELP_LINK)"
            >
              {{ content }}
            </gl-link>
          </template>
        </gl-sprintf>
      </li>
      <li>
        <gl-sprintf :message="$options.i18n.needs">
          <template #link="{ content }">
            <gl-link
              :href="needsHelpPagePath"
              target="_blank"
              @click="trackHelpPageClick($options.CI_NEEDS_LINK)"
            >
              {{ content }}
            </gl-link>
          </template>
        </gl-sprintf>
      </li>
    </ul>
  </div>
</template>