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

constants.js « job_assistant_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: e93a9e8430293b6ffa73aa8f0a615b23201cf796 (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
108
109
110
111
112
113
114
115
116
117
118
import { __, s__ } from '~/locale';

export const DRAWER_CONTAINER_CLASS = '.content-wrapper';

export const JOB_RULES_WHEN = {
  onSuccess: {
    value: 'on_success',
    text: s__('JobAssistant|on_success'),
  },
  onFailure: {
    value: 'on_failure',
    text: s__('JobAssistant|on_failure'),
  },
  manual: {
    value: 'manual',
    text: s__('JobAssistant|manual'),
  },
  always: {
    value: 'always',
    text: s__('JobAssistant|always'),
  },
  delayed: {
    value: 'delayed',
    text: s__('JobAssistant|delayed'),
  },
  never: {
    value: 'never',
    text: s__('JobAssistant|never'),
  },
};

export const JOB_RULES_START_IN = {
  second: {
    value: 'second',
    text: s__('JobAssistant|second(s)'),
  },
  minute: {
    value: 'minute',
    text: s__('JobAssistant|minute(s)'),
  },
  day: {
    value: 'day',
    text: s__('JobAssistant|day(s)'),
  },
  week: {
    value: 'week',
    text: s__('JobAssistant|week(s)'),
  },
};

export const SECONDS_MULTIPLE_MAP = {
  second: 1,
  minute: 60,
  day: 3600 * 24,
  week: 3600 * 24 * 7,
};

export const JOB_TEMPLATE = {
  name: '',
  stage: '',
  script: '',
  tags: [],
  image: {
    name: '',
    entrypoint: [''],
  },
  services: [
    {
      name: '',
      entrypoint: [''],
    },
  ],
  artifacts: {
    paths: [''],
    exclude: [''],
  },
  cache: {
    paths: [''],
    key: '',
  },
  rules: [
    {
      allow_failure: false,
      when: 'on_success',
      start_in: '',
    },
  ],
};

export const i18n = {
  ARRAY_FIELD_DESCRIPTION: s__('JobAssistant|Please separate array type fields with new lines'),
  INPUT_FORMAT: s__('JobAssistant|Input format'),
  ADD_JOB: s__('JobAssistant|Add job'),
  SCRIPT: s__('JobAssistant|Script'),
  JOB_NAME: s__('JobAssistant|Job name'),
  JOB_SETUP: s__('JobAssistant|Job Setup'),
  STAGE: s__('JobAssistant|Stage (optional)'),
  TAGS: s__('JobAssistant|Tags (optional)'),
  IMAGE: s__('JobAssistant|Image'),
  IMAGE_NAME: s__('JobAssistant|Image name (optional)'),
  IMAGE_ENTRYPOINT: s__('JobAssistant|Image entrypoint (optional)'),
  THIS_FIELD_IS_REQUIRED: __('This field is required'),
  CACHE_PATHS: s__('JobAssistant|Cache paths (optional)'),
  CACHE_KEY: s__('JobAssistant|Cache key (optional)'),
  ARTIFACTS_EXCLUDE_PATHS: s__('JobAssistant|Artifacts exclude paths (optional)'),
  ARTIFACTS_PATHS: s__('JobAssistant|Artifacts paths (optional)'),
  ARTIFACTS_AND_CACHE: s__('JobAssistant|Artifacts and cache'),
  ADD_PATH: s__('JobAssistant|Add path'),
  RULES: s__('JobAssistant|Rules'),
  WHEN: s__('JobAssistant|When'),
  ALLOW_FAILURE: s__('JobAssistant|Allow failure'),
  INVALID_START_IN: s__('JobAssistant|Error - Valid value is between 1 second and 1 week'),
  ADD_SERVICE: s__('JobAssistant|Add service'),
  SERVICE: s__('JobAssistant|Services'),
  SERVICE_NAME: s__('JobAssistant|Service name (optional)'),
  SERVICE_ENTRYPOINT: s__('JobAssistant|Service entrypoint (optional)'),
  ENTRYPOINT_PLACEHOLDER_TEXT: s__('JobAssistant|Please enter the parameters.'),
};