summaryrefslogtreecommitdiff
path: root/spec/frontend/pipeline_wizard/mock/yaml.js
blob: e7087b59ce7373df308136ed9ae6c35f1d6cd742 (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
export const stepInputs = `
- label: "Build Steps"
  description: "Enter the steps necessary for your application."
  widget: text
  target: $BUILD_STEPS
- label: "Select a deployment branch"
  description: "Select the branch we should use to generate your site from."
  widget: text
  target: $BRANCH
  pattern: "^[a-z]+$"
  invalidFeedback: "This field may only contain lowercase letters"
  required: true
`;

export const stepTemplate = `template:
  pages:
    script: $BUILD_STEPS
    artifacts:
      paths:
        - public
    only:
      - $BRANCH
`;

export const compiledYamlBeforeSetup = `abc: def`;

export const compiledYamlAfterInitialLoad = `abc: def
pages:
  script: $BUILD_STEPS
  artifacts:
    paths:
      - public
  only:
    - $BRANCH
`;

export const compiledYaml = `abc: def
pages:
  script: foo
  artifacts:
    paths:
      - public
  only:
    - bar
`;

export const steps = `
- inputs:
    - label: foo
      target: $FOO
      widget: text
  template:
    foo: $FOO
- inputs:
    - label: bar
      target: $BAR
      widget: text
  template:
    bar: $BAR
`;

export const compiledScenario1 = `foo: fooVal
`;

export const compiledScenario2 = `foo: fooVal
bar: barVal
`;

export const compiledScenario3 = `foo: newFooVal
bar: barVal
`;

export const fullTemplate = `
title: some title
description: some description
filename: foo.yml
steps:
  - inputs:
     - widget: text
       label: foo
       target: $BAR
    template:
      foo: $BAR
`;

export const fullTemplateWithoutFilename = `
title: some title
description: some description
steps:
  - inputs:
     - widget: text
       label: foo
       target: $BAR
    template:
      foo: $BAR
`;