summaryrefslogtreecommitdiff
path: root/spec/contracts/contracts/project/pipeline/new/pipelines#new-post_create_a_new_pipeline.json
blob: 4627f0cb0bf98ca745a28b86c4b603dbb6d59dfa (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
{
  "consumer": {
    "name": "Pipelines#new"
  },
  "provider": {
    "name": "POST Create a new pipeline"
  },
  "interactions": [
    {
      "description": "a request to create a new pipeline",
      "providerState": "a project with a valid .gitlab-ci.yml configuration exists",
      "request": {
        "method": "POST",
        "path": "/gitlab-org/gitlab-qa/-/pipelines",
        "headers": {
          "Accept": "*/*",
          "Content-Type": "application/json; charset=utf-8"
        },
        "body": {
          "ref": "master"
        }
      },
      "response": {
        "status": 302,
        "headers": {
          "Content-Type": "text/html; charset=utf-8"
        },
        "body": "<html><body>You are being <a href=\"http://example.org/gitlab-org/gitlab-qa/-/pipelines/5\">redirected</a>.</body></html>",
        "matchingRules": {
          "$.body": {
            "match": "regex",
            "regex": "You are being <a href=\\\"(.)+\\/pipelines\\/[0-9]+\\\">redirected<\\/a>."
          }
        }
      }
    }
  ],
  "metadata": {
    "pactSpecification": {
      "version": "2.0.0"
    }
  }
}