summaryrefslogtreecommitdiff
path: root/spec/frontend/pipelines/pipeline_graph/mock_data.js
blob: 5a5d6c021a6aadaa89f7ca377646c5663aa9304f (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
export const yamlString = `stages:
- empty
- build
- test
- deploy
- final

include:
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'

build_a:
  stage: build
  script: echo hello
build_b:
  stage: build
  script: echo hello
build_c:
  stage: build
  script: echo hello
build_d:
  stage: Queen
  script: echo hello

test_a:
  stage: test
  script: ls
  needs: [build_a, build_b, build_c]
test_b:
  stage: test
  script: ls
  needs: [build_a, build_b, build_d]
test_c:
  stage: test
  script: ls
  needs: [build_a, build_b, build_c]

deploy_a:
  stage: deploy
  script: echo hello
`;

export const pipelineData = {
  stages: [
    {
      name: 'build',
      groups: [],
    },
    {
      name: 'build',
      groups: [
        {
          name: 'build_1',
          jobs: [{ script: 'echo hello', stage: 'build' }],
        },
      ],
    },
    {
      name: 'test',
      groups: [
        {
          name: 'test_1',
          jobs: [{ script: 'yarn test', stage: 'test' }],
        },
        {
          name: 'test_2',
          jobs: [{ script: 'yarn karma', stage: 'test' }],
        },
      ],
    },
    {
      name: 'deploy',
      groups: [
        {
          name: 'deploy_1',
          jobs: [{ script: 'yarn magick', stage: 'deploy' }],
        },
      ],
    },
  ],
};