{
    "title": "JSON schema for Travis CI configuration files",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "nonEmptyString": {
            "type": "string",
            "minLength": 1
        },
        "stringArrayUnique": {
            "type": "array",
            "_uniqueItems": true,
            "minItems": 1,
            "items": {
                "$ref": "#/definitions/nonEmptyString"
            }
        },
        "stringOrStringArrayUnique": {
            "oneOf": [
                {
                    "$ref": "#/definitions/nonEmptyString"
                },
                {
                    "$ref": "#/definitions/stringArrayUnique"
                }
            ]
        },
        "possiblySecretString": {
            "oneOf": [
                {
                    "type": "string"
                },
                {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                        "secure": {
                            "type": "string"
                        }
                    }
                }
            ]
        },
        "slackRoom": {
            "description": "Your account name, token and optional channel",
            "type": "string",
            "pattern": ".+:.+(#.+)?"
        },
        "notificationFrequency": {
            "enum": [
                "always",
                "never",
                "change"
            ]
        },
        "step": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "enum": [
                        "skip",
                        "ignore"
                    ]
                },
                {
                    "type": "string"
                },
                {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            ]
        },
        "service": {
            "enum": [
                "cassandra",
                "couchdb",
                "docker",
                "elasticsearch",
                "mariadb",
                "memcached",
                "mongodb",
                "mysql",
                "neo4j",
                "postgresql",
                "rabbitmq",
                "redis-server",
                "rethinkdb",
                "riak"
            ]
        },
        "cache": {
            "enum": [
                "bundler",
                "cargo",
                "ccache",
                "cocoapods",
                "packages",
                "pip",
                "yarn",
                "npm"
            ]
        },
        "envVars": {
            "oneOf": [
                {
                    "$ref": "#/definitions/envVar"
                },
                {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/envVar"
                    }
                }
            ]
        },
        "envVar": {
            "oneOf": [
                {
                    "type": "string",
                    "pattern": "[^=]+=.*"
                },
                {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                        "secure": {
                            "type": "string",
                            "pattern": "[^=]+=.*"
                        }
                    }
                }
            ]
        },
        "job": {
            "type": "object",
            "properties": {
                "language": {
                    "enum": [
                        "android",
                        "bash",
                        "c",
                        "c++",
                        "clojure",
                        "cpp",
                        "crystal",
                        "csharp",
                        "d",
                        "dart",
                        "dartlang",
                        "elixir",
                        "erlang",
                        "generic",
                        "go",
                        "golang",
                        "groovy",
                        "haskell",
                        "haxe",
                        "java",
                        "javascript",
                        "julia",
                        "jvm",
                        "minimal",
                        "nix",
                        "node",
                        "node.js",
                        "node_js",
                        "nodejs",
                        "obj-c",
                        "obj_c",
                        "objective-c",
                        "objective_c",
                        "perl",
                        "perl6",
                        "php",
                        "python",
                        "r",
                        "ruby",
                        "rust",
                        "scala",
                        "sh",
                        "shell",
                        "smalltalk"
                    ]
                },
                "haxe": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "scala": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "sbt_args": {
                    "type": "string"
                },
                "crystal": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "neko": {
                    "type": "string"
                },
                "hxml": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "smalltalk": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "perl": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "perl6": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "d": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "dart": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "dart_task": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "test": {
                                "type": "string"
                            },
                            "install_dartium": {
                                "type": "boolean"
                            },
                            "xvfb": {
                                "type": "boolean"
                            },
                            "dartanalyzer": {
                                "type": "boolean"
                            },
                            "dartfmt": {
                                "type": "boolean"
                            }
                        }
                    }
                },
                "ghc": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "lein": {
                    "type": "string"
                },
                "android": {
                    "type": "object",
                    "properties": {
                        "components": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "licenses": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    "additionalProperties": false
                },
                "node_js": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "compiler": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "enum": [
                                    "clang",
                                    "gcc"
                                ]
                            }
                        },
                        {
                            "enum": [
                                "clang",
                                "gcc"
                            ]
                        }
                    ]
                },
                "php": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "go": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "jdk": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "solution": {
                    "type": "string",
                    "description": "When the optional solution key is present, Travis will run NuGet package restore and build the given solution."
                },
                "mono": {
                    "oneOf": [
                        {
                            "enum": [
                                "none"
                            ]
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "xcode_project": {
                    "type": "string"
                },
                "xcode_workspace": {
                    "type": "string"
                },
                "xcode_scheme": {
                    "type": "string"
                },
                "xcode_sdk": {
                    "type": "string"
                },
                "podfile": {
                    "type": "string",
                    "description": "By default, Travis CI will assume that your Podfile is in the root of the repository. If this is not the case, you can specify where the Podfile is"
                },
                "python": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "string"
                        },
                        {
                            "type": "number"
                        }
                    ]
                },
                "elixir": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "rust": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "string"
                        },
                        {
                            "type": "number"
                        }
                    ]
                },
                "erlang": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "julia": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "opt_release": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "rvm": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "gemfile": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "bundler_args": {
                    "type": "string"
                },
                "r": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "pandoc_version": {
                    "type": "string"
                },
                "brew_packages": {
                    "type": "array",
                    "description": "A list of packages to install via brew. This option is ignored on non-OS X builds.",
                    "items": {
                        "type": "string"
                    }
                },
                "r_binary_packages": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "r_packages": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "bioc_packages": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "r_github_packages": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "apt_packages": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "cran": {
                    "type": "string",
                    "description": "CRAN mirror to use for fetching packages"
                },
                "repos": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    },
                    "description": "Dictionary of repositories to pass to options(repos)"
                },
                "os": {
                    "description": "The operating system to run the job on",
                    "oneOf": [
                        {
                            "enum": [
                                "osx",
                                "linux",
                                "windows"
                            ]
                        },
                        {
                            "type": "array",
                            "items": {
                                "enum": [
                                    "osx",
                                    "linux",
                                    "windows"
                                ]
                            }
                        }
                    ]
                },
                "osx_image": {
                    "oneOf": [
                        {
                            "enum": [
                                "xcode6.4",
                                "xcode7.3",
                                "xcode8",
                                "xcode8.3",
                                "xcode9",
                                "xcode9.1",
                                "xcode9.2",
                                "xcode9.3",
                                "xcode9.4",
                                "xcode10",
                                "xcode10.1"
                            ]
                        },
                        {
                            "type": "array",
                            "items": {
                                "enum": [
                                    "xcode6.4",
                                    "xcode7.3",
                                    "xcode8",
                                    "xcode8.3",
                                    "xcode9",
                                    "xcode9.1",
                                    "xcode9.2",
                                    "xcode9.3",
                                    "xcode9.4",
                                    "xcode10",
                                    "xcode10.1"
                                ]
                            }
                        }
                    ],
                    "default": "xcode9.4"
                },
                "dist": {
                    "description": "The Ubuntu distribution to use",
                    "enum": [
                        "precise",
                        "trusty",
                        "xenial"
                    ]
                },
                "sudo": {
                    "enum": [
                        true,
                        false,
                        "",
                        "required",
                        "enabled"
                    ]
                },
                "addons": {
                    "type": "object",
                    "properties": {
                        "apt": {
                            "type": "object",
                            "description": "To install packages not included in the default container-based-infrastructure you need to use the APT addon, as sudo apt-get is not available",
                            "properties": {
                                "update": {
                                    "type": "boolean",
                                    "description": "To update the list of available packages"
                                },
                                "sources": {
                                    "type": "array",
                                    "items": {
                                        "oneOf": [
                                            {
                                                "type": "object",
                                                "properties": {
                                                    "sourceline": {
                                                        "type": "string",
                                                        "description": "Key-value pairs which will be added to /etc/apt/sources.list"
                                                    },
                                                    "key_url": {
                                                        "type": "string",
                                                        "description": "When APT sources require GPG keys, you can specify this with key_url"
                                                    }
                                                },
                                                "required": [
                                                    "sourceline"
                                                ],
                                                "additionalProperties": false
                                            },
                                            {
                                                "type": "string",
                                                "description": "Alias defined in source whitelist"
                                            }
                                        ]
                                    }
                                },
                                "packages": {
                                    "type": "array",
                                    "description": "To install packages from the package whitelist before your custom build steps",
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            },
                            "additionalProperties": false
                        },
                        "hosts": {
                            "description": "If your build requires setting up custom hostnames, you can specify a single host or a list of them. Travis CI will automatically setup the hostnames in /etc/hosts for both IPv4 and IPv6.",
                            "oneOf": [
                                {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                {
                                    "type": "string"
                                }
                            ]
                        },
                        "artifacts": {
                            "oneOf": [
                                {
                                    "enum": [
                                        true
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "s3_region": {
                                            "type": "string"
                                        },
                                        "paths": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "working_dir": {
                                            "type": "string",
                                            "description": "If you\u2019d like to upload file from a specific directory, you can change your working directory "
                                        },
                                        "debug": {
                                            "type": "boolean",
                                            "description": "If you\u2019d like to see more detail about what the artifacts addon is doing"
                                        }
                                    }
                                }
                            ]
                        },
                        "firefox": {
                            "description": "Firefox addon",
                            "type": "string",
                            "enum": [
                                "latest",
                                "latest-esr",
                                "latest-beta",
                                "latest-dev",
                                "latest-nightly",
                                "latest-unsigned"
                            ]
                        },
                        "chrome": {
                            "description": "Chrome addon",
                            "type": "string",
                            "enum": [
                                "stable",
                                "beta"
                            ]
                        },
                        "rethinkdb": {
                            "description": "RethinkDB addon",
                            "type": "string"
                        },
                        "postgresql": {
                            "description": "PostgreSQL addon",
                            "type": "string"
                        },
                        "mariadb": {
                            "description": "MariaDB addon",
                            "type": "string"
                        },
                        "sauce_connect": {
                            "description": "Sauce Connect addon",
                            "oneOf": [
                                {
                                    "type": "object",
                                    "properties": {
                                        "username": {
                                            "type": "string"
                                        },
                                        "access_key": {
                                            "type": "string"
                                        }
                                    }
                                },
                                {
                                    "type": "boolean"
                                }
                            ]
                        },
                        "sonarcloud": {
                            "description": "SonarCloud addon",
                            "type": "object",
                            "properties": {
                                "organization": {
                                    "type": "string"
                                },
                                "token": {
                                    "type": "object",
                                    "properties": {
                                        "secure": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        },
                        "coverity_scan": {
                            "description": "Coverity Scan addon",
                            "type": "object",
                            "properties": {
                                "project": {
                                    "description": "GitHub project metadata",
                                    "type": "object",
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "version": {
                                            "type": "number"
                                        },
                                        "description": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "name"
                                    ]
                                },
                                "notification_email": {
                                    "description": "Where email notification of build analysis results will be sent",
                                    "type": "string"
                                },
                                "build_command_prepend": {
                                    "description": "Commands to prepare for build_command",
                                    "type": "string"
                                },
                                "build_command": {
                                    "description": "The command that will be added as an argument to 'cov-build' to compile your project for analysis",
                                    "type": "string"
                                },
                                "branch_pattern": {
                                    "description": "Pattern to match selecting branches that will run analysis. We recommend leaving this set to 'coverity_scan'",
                                    "type": "string"
                                }
                            }
                        },
                        "homebrew": {
                            "description": "Homebrew addon",
                            "type": "object",
                            "properties": {
                                "taps": {
                                    "$ref": "#/definitions/stringOrStringArrayUnique"
                                },
                                "packages": {
                                    "$ref": "#/definitions/stringOrStringArrayUnique"
                                },
                                "casks": {
                                    "$ref": "#/definitions/stringOrStringArrayUnique"
                                },
                                "brewfile": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/definitions/nonEmptyString"
                                        },
                                        {
                                            "type": "boolean",
                                            "default": true
                                        }
                                    ]
                                },
                                "update": {
                                    "type": "boolean",
                                    "default": true
                                }
                            }
                        },
                        "srcclr": {
                            "description": "SourceClear addon",
                            "oneOf": [
                                {
                                    "type": "boolean",
                                    "default": true
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "debug": {
                                            "type": "boolean",
                                            "default": true
                                        }
                                    }
                                }
                            ]
                        }
                    },
                    "additionalProperties": false
                },
                "cache": {
                    "oneOf": [
                        {
                            "enum": [
                                false
                            ]
                        },
                        {
                            "$ref": "#/definitions/cache"
                        },
                        {
                            "type": "array",
                            "items": {
                                "oneOf": [
                                    {
                                        "type": "string",
                                        "$ref": "#/definitions/cache"
                                    },
                                    {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "directories": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                ]
                            }
                        },
                        {
                            "type": "object",
                            "properties": {
                                "directories": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "timeout": {
                                    "type": "number",
                                    "description": "Upload timeout in seconds",
                                    "default": 1800
                                },
                                "bundler": {
                                    "type": "boolean"
                                },
                                "cocoapods": {
                                    "type": "boolean"
                                },
                                "pip": {
                                    "type": "boolean"
                                },
                                "yarn": {
                                    "type": "boolean"
                                },
                                "ccache": {
                                    "type": "boolean"
                                },
                                "packages": {
                                    "type": "boolean"
                                },
                                "cargo": {
                                    "type": "boolean"
                                },
                                "npm": {
                                    "type": "boolean"
                                }
                            },
                            "additionalProperties": false
                        }
                    ]
                },
                "services": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/service"
                        },
                        {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/service"
                            }
                        }
                    ]
                },
                "git": {
                    "type": "object",
                    "properties": {
                        "depth": {
                            "oneOf": [
                                {
                                    "type": "integer",
                                    "description": "Set the git clone depth",
                                    "default": 50
                                },
                                {
                                    "enum": [
                                        false
                                    ]
                                }
                            ]
                        },
                        "quiet": {
                            "type": "boolean",
                            "description": "Travis CI clones repositories without the quiet flag (-q) by default. Enabling the quiet flag can be useful if you\u2019re trying to avoid log file size limits or even if you just don\u2019t need to include it."
                        },
                        "submodules": {
                            "type": "boolean",
                            "description": "Control whether submodules should be cloned"
                        },
                        "lfs_skip_smudge": {
                            "type": "boolean",
                            "description": "Skip fetching the git-lfs files during the initial git clone (equivalent to git lfs smudge --skip),"
                        }
                    },
                    "additionalProperties": false
                },
                "branches": {
                    "type": "object",
                    "description": "Specify which branches to build",
                    "properties": {
                        "except": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "only": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    "additionalProperties": false
                },
                "env": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/envVars"
                        },
                        {
                            "type": "object",
                            "properties": {
                                "global": {
                                    "$ref": "#/definitions/envVars"
                                },
                                "matrix": {
                                    "$ref": "#/definitions/envVars"
                                }
                            },
                            "additionalProperties": false
                        }
                    ]
                },
                "before_install": {
                    "$ref": "#/definitions/step"
                },
                "install": {
                    "$ref": "#/definitions/step"
                },
                "before_script": {
                    "$ref": "#/definitions/step"
                },
                "script": {
                    "$ref": "#/definitions/step"
                },
                "before_cache": {
                    "$ref": "#/definitions/step"
                },
                "after_success": {
                    "$ref": "#/definitions/step"
                },
                "after_failure": {
                    "$ref": "#/definitions/step"
                },
                "before_deploy": {
                    "$ref": "#/definitions/step"
                },
                "deploy": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/deployment"
                            }
                        },
                        {
                            "$ref": "#/definitions/deployment"
                        }
                    ]
                },
                "after_deploy": {
                    "$ref": "#/definitions/step"
                },
                "after_script": {
                    "$ref": "#/definitions/step"
                }
            }
        },
        "deployment": {
            "allOf": [
                {
                    "type": "object",
                    "properties": {
                        "on": {
                            "type": "object",
                            "properties": {
                                "tags": {
                                    "description": "Tell Travis CI to only deploy on tagged commits",
                                    "oneOf": [
                                        {
                                            "type": "boolean"
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                },
                                "branch": {
                                    "type": "string"
                                },
                                "all_branches": {
                                    "type": "boolean"
                                },
                                "skip_cleanup": {
                                    "type": "boolean",
                                    "description": "After your tests ran and before the release, Travis CI will clean up any additional files and changes you made. Maybe that is not what you want, as you might generate some artifacts that are supposed to be released, too."
                                },
                                "repo": {
                                    "type": "string"
                                },
                                "condition": {
                                    "type": "string",
                                    "description": "if [[ <condition> ]]; then <deploy>; fi"
                                }
                            }
                        }
                    }
                },
                {
                    "oneOf": [
                        {
                            "type": "object",
                            "properties": {
                                "provider": {
                                    "enum": [
                                        "script"
                                    ]
                                },
                                "script": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "provider",
                                "script"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "provider": {
                                    "enum": [
                                        "npm"
                                    ]
                                },
                                "email": {
                                    "$ref": "#/definitions/possiblySecretString"
                                },
                                "api_key": {
                                    "$ref": "#/definitions/possiblySecretString"
                                },
                                "tag": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "provider",
                                "email",
                                "api_key"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "provider": {
                                    "enum": [
                                        "surge"
                                    ]
                                },
                                "project": {
                                    "type": "string"
                                },
                                "domain": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "provider"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "provider": {
                                    "enum": [
                                        "releases"
                                    ]
                                },
                                "api_key": {
                                    "$ref": "#/definitions/possiblySecretString"
                                },
                                "user": {
                                    "$ref": "#/definitions/possiblySecretString"
                                },
                                "password": {
                                    "$ref": "#/definitions/possiblySecretString"
                                },
                                "file": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    ]
                                },
                                "file_glob": {
                                    "type": "boolean"
                                },
                                "overwrite": {
                                    "type": "boolean",
                                    "description": "If you need to overwrite existing files"
                                }
                            },
                            "required": [
                                "provider"
                            ]
                        },
                        {
                            "type": "object",
                            "description": "deploy to heroku, to see https://docs.travis-ci.com/user/deployment/heroku/",
                            "properties": {
                                "provider": {
                                    "enum": [
                                        "heroku"
                                    ]
                                },
                                "api_key": {
                                    "description": "heroku auth token",
                                    "anyOf": [
                                        {
                                            "$ref": "#/definitions/possiblySecretString"
                                        },
                                        {
                                            "type": "object",
                                            "additionalProperties": {
                                                "$ref": "#/definitions/possiblySecretString"
                                            }
                                        }
                                    ]
                                },
                                "app": {
                                    "oneOf": [
                                        {
                                            "type": "string",
                                            "description": "Deploy master branch to heroku app"
                                        },
                                        {
                                            "type": "object",
                                            "description": "Deploy the different branch to the different heroku app",
                                            "additionalProperties": {
                                                "type": "string"
                                            }
                                        }
                                    ]
                                },
                                "run": {
                                    "description": "to run a command on Heroku after a successful deploy",
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    ]
                                },
                                "skip_cleanup": {
                                    "type": "boolean",
                                    "description": "Travis CI default will clean up any additional files and changes you made, you can by it to skip the clean up"
                                },
                                "strategy": {
                                    "enum": [
                                        "api",
                                        "git"
                                    ],
                                    "description": "Travis CI supports different mechanisms for deploying to Heroku: api is default"
                                }
                            },
                            "required": [
                                "provider",
                                "api_key"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "provider": {
                                    "enum": [
                                        "s3"
                                    ]
                                },
                                "access_key_id": {
                                    "$ref": "#/definitions/possiblySecretString"
                                },
                                "secret_access_key": {
                                    "$ref": "#/definitions/possiblySecretString"
                                },
                                "bucket": {
                                    "type": "string"
                                },
                                "region": {
                                    "type": "string"
                                },
                                "skip_cleanup": {
                                    "type": "boolean",
                                    "default": false
                                },
                                "acl": {
                                    "enum": [
                                        "private",
                                        "public_read",
                                        "public_read_write",
                                        "authenticated_read",
                                        "bucket_owner_read",
                                        "bucket_owner_full_control"
                                    ]
                                },
                                "local_dir": {
                                    "type": "string"
                                },
                                "upload-dir": {
                                    "type": "string"
                                },
                                "detect_encoding": {
                                    "type": "boolean",
                                    "default": false
                                },
                                "default_text_charset": {
                                    "type": "string"
                                },
                                "cache_control": {
                                    "type": "string"
                                },
                                "expires": {
                                    "type": "string"
                                },
                                "endpoint": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "provider",
                                "access_key_id",
                                "secret_access_key",
                                "bucket"
                            ]
                        },
                        {
                            "type": "object",
                            "properties": {
                                "provider": {
                                    "type": "string",
                                    "not": {
                                        "enum": [
                                            "script",
                                            "npm",
                                            "surge",
                                            "releases",
                                            "heroku",
                                            "s3"
                                        ]
                                    }
                                }
                            },
                            "required": [
                                "provider"
                            ]
                        }
                    ]
                }
            ]
        }
    },
    "allOf": [
        {
            "$ref": "#/definitions/job"
        },
        {
            "type": "object",
            "properties": {
                "notifications": {
                    "type": "object",
                    "properties": {
                        "webhooks": {
                            "oneOf": [
                                {
                                    "type": "array",
                                    "items": {
                                        "type": "string",
                                        "format": "uri"
                                    }
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "urls": {
                                            "oneOf": [
                                                {
                                                    "type": "string",
                                                    "format": "uri"
                                                },
                                                {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "format": "uri"
                                                    }
                                                }
                                            ]
                                        }
                                    },
                                    "on_success": {
                                        "$ref": "#/definitions/notificationFrequency"
                                    },
                                    "on_failure": {
                                        "$ref": "#/definitions/notificationFrequency"
                                    },
                                    "on_start": {
                                        "$ref": "#/definitions/notificationFrequency"
                                    },
                                    "on_cancel": {
                                        "$ref": "#/definitions/notificationFrequency"
                                    },
                                    "on_error": {
                                        "$ref": "#/definitions/notificationFrequency"
                                    }
                                }
                            ]
                        },
                        "slack": {
                            "oneOf": [
                                {
                                    "$ref": "#/definitions/slackRoom"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "rooms": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/slackRoom"
                                            }
                                        },
                                        "on_pull_requests": {
                                            "type": "boolean"
                                        },
                                        "template": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "on_success": {
                                            "$ref": "#/definitions/notificationFrequency"
                                        },
                                        "on_failure": {
                                            "$ref": "#/definitions/notificationFrequency"
                                        }
                                    },
                                    "additionalProperties": false
                                }
                            ]
                        },
                        "email": {
                            "oneOf": [
                                {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                {
                                    "enum": [
                                        false
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "recipients": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "on_success": {
                                            "$ref": "#/definitions/notificationFrequency",
                                            "default": "change"
                                        },
                                        "on_failure": {
                                            "$ref": "#/definitions/notificationFrequency",
                                            "default": "always"
                                        }
                                    }
                                }
                            ]
                        },
                        "irc": {
                            "oneOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "channels": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "channel_key": {
                                            "type": "string"
                                        },
                                        "nick": {
                                            "type": "string"
                                        },
                                        "password": {
                                            "type": "string"
                                        },
                                        "template": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "on_success": {
                                            "$ref": "#/definitions/notificationFrequency",
                                            "default": "always"
                                        },
                                        "on_failure": {
                                            "$ref": "#/definitions/notificationFrequency",
                                            "default": "always"
                                        },
                                        "skip_join": {
                                            "type": "boolean"
                                        },
                                        "use_notice": {
                                            "type": "boolean"
                                        }
                                    }
                                }
                            ]
                        }
                    },
                    "additionalProperties": false
                },
                "matrix": {
                    "type": "object",
                    "properties": {
                        "exclude": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/job"
                            }
                        },
                        "include": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/job"
                            }
                        },
                        "allow_failures": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/job"
                            }
                        },
                        "fast_finish": {
                            "type": "boolean",
                            "description": "If some rows in the build matrix are allowed to fail, the build won\u2019t be marked as finished until they have completed. To mark the build as finished as soon as possible, add fast_finish: true"
                        }
                    },
                    "additionalProperties": false
                },
                "jobs": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                        "include": {
                            "type": "array",
                            "items": {
                                "allOf": [
                                    {
                                        "$ref": "#/definitions/job"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "stage": {
                                                "type": "string",
                                                "description": "The name of the build stage",
                                                "default": "test"
                                            }
                                        }
                                    }
                                ]
                            }
                        },
                        "allow_failures": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/job"
                            }
                        }
                    }
                },
                "stages": {
                    "type": "array",
                    "description": "Specifies the order of build stages",
                    "items": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "name": {
                                        "type": "string"
                                    },
                                    "if": {
                                        "description": "Specifies a condition for the stage",
                                        "type": "string"
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        }
    ]
}