{
  "$id": "https://json.schemastore.org/zuul.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "JobEntry": {
      "additionalProperties": false,
      "properties": {
        "job": {
          "$ref": "#/definitions/JobModel"
        }
      },
      "required": ["job"],
      "title": "JobEntry",
      "type": "object"
    },
    "JobModel": {
      "additionalProperties": false,
      "properties": {
        "abstract": {
          "default": false,
          "title": "Abstract",
          "type": "boolean"
        },
        "allowed-projects": {
          "title": "Allowed-Projects",
          "type": "string"
        },
        "ansible-version": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "enum": ["2.7", "2.8", "2.9", "2.10", "2.11"],
              "type": "string"
            }
          ],
          "title": "Ansible-Version"
        },
        "attempts": {
          "title": "Attempts",
          "type": "integer"
        },
        "branches": {
          "title": "Branches",
          "type": "string"
        },
        "description": {
          "title": "Description",
          "type": "string"
        },
        "dependencies": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "items": {
                "$ref": "#/definitions/JobDependencyModel"
              },
              "type": "array"
            }
          ],
          "title": "Files"
        },
        "failure-url": {
          "title": "Failure-Url",
          "type": "string"
        },
        "files": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ],
          "title": "Files"
        },
        "final": {
          "default": false,
          "title": "Final",
          "type": "boolean"
        },
        "host-vars": {
          "additionalProperties": {
            "type": "object"
          },
          "title": "Host-Vars",
          "type": "object"
        },
        "irrelevant-files": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ],
          "title": "Irrelevant-Files"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "nodeset": {
          "title": "Nodeset"
        },
        "override-checkout": {
          "title": "Override-Checkout",
          "type": "string"
        },
        "parent": {
          "title": "Parent",
          "type": "string"
        },
        "post-run": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ],
          "title": "Post-Run"
        },
        "post-timeout": {
          "title": "Post-Timeout",
          "type": "integer"
        },
        "pre-run": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ],
          "title": "Pre-Run"
        },
        "provides": {
          "items": {
            "type": "string"
          },
          "title": "Provides",
          "type": "array"
        },
        "required-projects": {
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/definitions/RequiredProjectModel"
              }
            ]
          },
          "title": "Required-Projects",
          "type": "array"
        },
        "requires": {
          "items": {
            "type": "string"
          },
          "title": "Requires",
          "type": "array"
        },
        "roles": {
          "items": {
            "$ref": "#/definitions/ZuulRoleModel"
          },
          "title": "Roles",
          "type": "array"
        },
        "run": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ],
          "title": "Run"
        },
        "secrets": {
          "anyOf": [
            {
              "$ref": "#/definitions/JobSecretModel"
            },
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/JobSecretModel"
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "type": "array"
            }
          ],
          "title": "Secrets"
        },
        "success-url": {
          "title": "Success-Url",
          "type": "string"
        },
        "tags": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ],
          "title": "Tags"
        },
        "timeout": {
          "title": "Timeout",
          "type": "integer"
        },
        "vars": {
          "title": "Vars",
          "type": "object"
        },
        "voting": {
          "default": true,
          "title": "Voting",
          "type": "boolean"
        },
        "workspace-scheme": {
          "title": "Workspace Scheme",
          "enum": ["flat", "golang", "unique"],
          "type": "string"
        }
      },
      "required": ["name"],
      "title": "JobModel",
      "type": "object"
    },
    "JobDependencyModel": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        },
        "soft": {
          "default": false,
          "title": "Soft",
          "type": "boolean"
        }
      },
      "required": ["name"],
      "title": "JobDependencyModel",
      "type": "object"
    },
    "JobSecretModel": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        },
        "pass-to-parent": {
          "default": false,
          "title": "Pass-To-Parent",
          "type": "boolean"
        },
        "secret": {
          "title": "Secret",
          "type": "string"
        }
      },
      "required": ["name", "secret"],
      "title": "JobSecretModel",
      "type": "object"
    },
    "PipelineModel": {
      "additionalProperties": false,
      "properties": {
        "jobs": {
          "items": {},
          "title": "Jobs",
          "type": "array"
        },
        "queue": {
          "title": "Queue",
          "type": "string"
        }
      },
      "title": "PipelineModel",
      "type": "object"
    },
    "ProjectEntry": {
      "additionalProperties": false,
      "properties": {
        "project": {
          "$ref": "#/definitions/ProjectModel"
        }
      },
      "required": ["project"],
      "title": "ProjectEntry",
      "type": "object"
    },
    "ProjectModel": {
      "additionalProperties": false,
      "properties": {
        "check": {
          "$ref": "#/definitions/PipelineModel"
        },
        "default-branch": {
          "title": "Default-Branch",
          "type": "string"
        },
        "description": {
          "title": "Description",
          "type": "string"
        },
        "gate": {
          "$ref": "#/definitions/PipelineModel"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "periodic-weekly": {
          "$ref": "#/definitions/PipelineModel"
        },
        "post": {
          "$ref": "#/definitions/PipelineModel"
        },
        "promote": {
          "$ref": "#/definitions/PipelineModel"
        },
        "queue": {
          "title": "Queue",
          "type": "string"
        },
        "release": {
          "$ref": "#/definitions/PipelineModel"
        },
        "templates": {
          "items": {
            "type": "string"
          },
          "title": "Templates",
          "type": "array"
        },
        "third-party-check": {
          "$ref": "#/definitions/PipelineModel"
        },
        "vars": {
          "title": "Vars",
          "type": "object"
        }
      },
      "title": "ProjectModel",
      "type": "object"
    },
    "ProjectTemplateEntry": {
      "additionalProperties": false,
      "properties": {
        "project-template": {
          "$ref": "#/definitions/ProjectTemplateModel"
        }
      },
      "required": ["project-template"],
      "title": "ProjectTemplateEntry",
      "type": "object"
    },
    "ProjectTemplateModel": {
      "additionalProperties": false,
      "properties": {
        "check": {
          "$ref": "#/definitions/PipelineModel"
        },
        "default-branch": {
          "title": "Default-Branch",
          "type": "string"
        },
        "description": {
          "title": "Description",
          "type": "string"
        },
        "gate": {
          "$ref": "#/definitions/PipelineModel"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "periodic-weekly": {
          "$ref": "#/definitions/PipelineModel"
        },
        "post": {
          "$ref": "#/definitions/PipelineModel"
        },
        "promote": {
          "$ref": "#/definitions/PipelineModel"
        },
        "queue": {
          "title": "Queue",
          "type": "string"
        },
        "release": {
          "$ref": "#/definitions/PipelineModel"
        },
        "third-party-check": {
          "$ref": "#/definitions/PipelineModel"
        },
        "vars": {
          "title": "Vars",
          "type": "object"
        }
      },
      "required": ["name"],
      "title": "ProjectTemplateModel",
      "type": "object"
    },
    "RequiredProjectModel": {
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        },
        "override-checkout": {
          "title": "Override-Checkout",
          "type": "string"
        }
      },
      "required": ["name"],
      "title": "RequiredProjectModel",
      "type": "object"
    },
    "SecretEntry": {
      "additionalProperties": false,
      "properties": {
        "secret": {
          "$ref": "#/definitions/SecretModel"
        }
      },
      "required": ["secret"],
      "title": "SecretEntry",
      "type": "object"
    },
    "SecretModel": {
      "additionalProperties": false,
      "properties": {
        "data": {
          "title": "Data",
          "type": "object"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": ["name", "data"],
      "title": "SecretModel",
      "type": "object"
    },
    "ZuulRoleModel": {
      "additionalProperties": false,
      "properties": {
        "zuul": {
          "title": "Zuul",
          "type": "string"
        }
      },
      "required": ["zuul"],
      "title": "ZuulRoleModel",
      "type": "object"
    }
  },
  "examples": ["zuul.d/*.yaml", "zuul-tests.d/*.yaml", ".zuul.yaml"],
  "items": {
    "anyOf": [
      {
        "$ref": "#/definitions/JobEntry"
      },
      {
        "$ref": "#/definitions/ProjectEntry"
      },
      {
        "$ref": "#/definitions/ProjectTemplateEntry"
      },
      {
        "$ref": "#/definitions/SecretEntry"
      }
    ]
  },
  "title": "Zuul Config Schema",
  "type": "array"
}