summaryrefslogtreecommitdiff
path: root/spec/frontend/vue_shared/components/runner_instructions/mock_data.js
blob: bc1545014d77e91b25c5ecda6e0fbb4e7d4e993c (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
119
export const mockGraphqlRunnerPlatforms = {
  data: {
    runnerPlatforms: {
      nodes: [
        {
          name: 'linux',
          humanReadableName: 'Linux',
          architectures: {
            nodes: [
              {
                name: 'amd64',
                downloadLocation:
                  'https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64',
                __typename: 'RunnerArchitecture',
              },
              {
                name: '386',
                downloadLocation:
                  'https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-386',
                __typename: 'RunnerArchitecture',
              },
              {
                name: 'arm',
                downloadLocation:
                  'https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-arm',
                __typename: 'RunnerArchitecture',
              },
              {
                name: 'arm64',
                downloadLocation:
                  'https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-arm64',
                __typename: 'RunnerArchitecture',
              },
            ],
            __typename: 'RunnerArchitectureConnection',
          },
          __typename: 'RunnerPlatform',
        },
        {
          name: 'osx',
          humanReadableName: 'macOS',
          architectures: {
            nodes: [
              {
                name: 'amd64',
                downloadLocation:
                  'https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-amd64',
                __typename: 'RunnerArchitecture',
              },
            ],
            __typename: 'RunnerArchitectureConnection',
          },
          __typename: 'RunnerPlatform',
        },
        {
          name: 'windows',
          humanReadableName: 'Windows',
          architectures: {
            nodes: [
              {
                name: 'amd64',
                downloadLocation:
                  'https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-amd64.exe',
                __typename: 'RunnerArchitecture',
              },
              {
                name: '386',
                downloadLocation:
                  'https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-386.exe',
                __typename: 'RunnerArchitecture',
              },
            ],
            __typename: 'RunnerArchitectureConnection',
          },
          __typename: 'RunnerPlatform',
        },
        {
          name: 'docker',
          humanReadableName: 'Docker',
          architectures: null,
          __typename: 'RunnerPlatform',
        },
        {
          name: 'kubernetes',
          humanReadableName: 'Kubernetes',
          architectures: null,
          __typename: 'RunnerPlatform',
        },
      ],
      __typename: 'RunnerPlatformConnection',
    },
    project: { id: 'gid://gitlab/Project/1', __typename: 'Project' },
    group: null,
  },
};

export const mockGraphqlInstructions = {
  data: {
    runnerSetup: {
      installInstructions:
        '# Install and run as service\nsudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner\nsudo gitlab-runner start',
      registerInstructions:
        'sudo gitlab-runner register --url http://gdk.test:3000/ --registration-token $REGISTRATION_TOKEN',
      __typename: 'RunnerSetup',
    },
  },
};

export const mockGraphqlInstructionsWindows = {
  data: {
    runnerSetup: {
      installInstructions:
        '# Windows runner, then run\n.gitlab-runner.exe install\n.gitlab-runner.exe start',
      registerInstructions:
        './gitlab-runner.exe register --url http://gdk.test:3000/ --registration-token $REGISTRATION_TOKEN',
      __typename: 'RunnerSetup',
    },
  },
};