From 95dc7fcc88c7fd523cca26ab6295a7397f319ea9 Mon Sep 17 00:00:00 2001 From: sirosen <1300022+sirosen@users.noreply.github.com> Date: Sun, 26 May 2024 04:24:19 +0000 Subject: [PATCH 01/15] [vendor-schemas] automated update --- CHANGELOG.rst | 2 + .../builtin_schemas/vendor/dependabot.json | 90 ++++++++++--------- .../vendor/github-workflows.json | 74 +++++++-------- .../builtin_schemas/vendor/renovate.json | 46 ++++++++-- .../vendor/sha256/dependabot.sha256 | 2 +- .../vendor/sha256/github-workflows.sha256 | 2 +- .../vendor/sha256/renovate.sha256 | 2 +- 7 files changed, 126 insertions(+), 92 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 292a185b5..057ce487c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,8 @@ Unreleased .. vendor-insert-here +- Update vendored schemas (2024-05-26) + 0.28.4 ------ diff --git a/src/check_jsonschema/builtin_schemas/vendor/dependabot.json b/src/check_jsonschema/builtin_schemas/vendor/dependabot.json index f4a9a76b4..c67fdd87c 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/dependabot.json +++ b/src/check_jsonschema/builtin_schemas/vendor/dependabot.json @@ -764,55 +764,57 @@ "groups": { "description": "Configure groups for dependencies. Each 'groups' property is arbitrary will appear in pull request titles and branch names. For example, the code snippet '{\"groups\": {\"NPM dependencies\": {\"patterns\": [\"*\"]}}}' sets the group name to 'NPM dependencies'.", "type": "object", - "patternProperties": { - "^.+$": { - "type": "object", - "properties": { - "dependency-type": { - "description": "Specify a dependency type to be included in the group.", + "additionalProperties": { + "type": "object", + "properties": { + "applies-to": { + "description": "Use to specify a whether the rules in the group apply to version updates or security updates.", + "type": "string", + "enum": ["version-updates", "security-updates"] + }, + "dependency-type": { + "description": "Specify a dependency type to be included in the group.", + "type": "string", + "enum": ["development", "production"] + }, + "patterns": { + "description": "Define strings of characters that match with a dependency name (or multiple dependency names) to include those dependencies in the group.", + "type": "array", + "items": { "type": "string", - "enum": ["development", "production"] + "minLength": 1 }, - "patterns": { - "description": "Define strings of characters that match with a dependency name (or multiple dependency names) to include those dependencies in the group.", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "uniqueItems": true, - "minItems": 1 - }, - "exclude-patterns": { - "description": "Exclude certain dependencies from the group. If a dependency is excluded from a group, Dependabot will continue to raise single pull requests to update the dependency to its latest version.", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "uniqueItems": true, - "minItems": 1 + "uniqueItems": true, + "minItems": 1 + }, + "exclude-patterns": { + "description": "Exclude certain dependencies from the group. If a dependency is excluded from a group, Dependabot will continue to raise single pull requests to update the dependency to its latest version.", + "type": "array", + "items": { + "type": "string", + "minLength": 1 }, - "update-types": { - "description": "Specify the semantic versioning level to include in the group", - "type": "array", - "items": { - "type": "string", - "enum": ["major", "minor", "patch"] - }, - "minItems": 1, - "uniqueItems": true - } + "uniqueItems": true, + "minItems": 1 }, - "anyOf": [ - { "required": ["dependency-type"] }, - { "required": ["patterns"] }, - { "required": ["update-types"] } - ], - "additionalProperties": false - } + "update-types": { + "description": "Specify the semantic versioning level to include in the group", + "type": "array", + "items": { + "type": "string", + "enum": ["major", "minor", "patch"] + }, + "minItems": 1, + "uniqueItems": true + } + }, + "anyOf": [ + { "required": ["dependency-type"] }, + { "required": ["patterns"] }, + { "required": ["update-types"] } + ], + "additionalProperties": false }, - "additionalProperties": false, "minProperties": 1 }, "ignore": { diff --git a/src/check_jsonschema/builtin_schemas/vendor/github-workflows.json b/src/check_jsonschema/builtin_schemas/vendor/github-workflows.json index 58fbc1b6b..bbd3cf766 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/github-workflows.json +++ b/src/check_jsonschema/builtin_schemas/vendor/github-workflows.json @@ -427,47 +427,47 @@ "description": "A build matrix is a set of different configurations of the virtual environment. For example you might run a job against more than one supported version of a language, operating system, or tool. Each configuration is a copy of the job that runs and reports a status.\nYou can specify a matrix by supplying an array for the configuration options. For example, if the GitHub virtual environment supports Node.js versions 6, 8, and 10 you could specify an array of those versions in the matrix.\nWhen you define a matrix of operating systems, you must set the required runs-on keyword to the operating system of the current job, rather than hard-coding the operating system name. To access the operating system name, you can use the matrix.os context parameter to set runs-on. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", "oneOf": [ { - "type": "object" + "type": "object", + "patternProperties": { + "^(in|ex)clude$": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build", + "oneOf": [ + { + "$ref": "#/definitions/expressionSyntax" + }, + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/configuration" + } + }, + "minItems": 1 + } + ] + } + }, + "additionalProperties": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/configuration" + }, + "minItems": 1 + }, + { + "$ref": "#/definitions/expressionSyntax" + } + ] + }, + "minProperties": 1 }, { "$ref": "#/definitions/expressionSyntax" } - ], - "patternProperties": { - "^(in|ex)clude$": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build", - "oneOf": [ - { - "$ref": "#/definitions/expressionSyntax" - }, - { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/configuration" - } - }, - "minItems": 1 - } - ] - } - }, - "additionalProperties": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/definitions/configuration" - }, - "minItems": 1 - }, - { - "$ref": "#/definitions/expressionSyntax" - } - ] - }, - "minProperties": 1 + ] }, "reusableWorkflowCallJob": { "$comment": "https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#calling-a-reusable-workflow", diff --git a/src/check_jsonschema/builtin_schemas/vendor/renovate.json b/src/check_jsonschema/builtin_schemas/vendor/renovate.json index abe7ec352..d60129107 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/renovate.json +++ b/src/check_jsonschema/builtin_schemas/vendor/renovate.json @@ -965,7 +965,7 @@ "dockerSidecarImage": { "description": "Change this value to override the default Renovate sidecar image.", "type": "string", - "default": "ghcr.io/containerbase/sidecar:10.6.11" + "default": "ghcr.io/containerbase/sidecar:10.6.15" }, "dockerUser": { "description": "Set the `UID` and `GID` for Docker-based binaries if you use `binarySource=docker`.", @@ -1905,6 +1905,36 @@ }, "$ref": "#" }, + "mergeConfidenceDatasources": { + "description": "If set, Renovate will query the merge-confidence JSON API only for datasources that are part of this list.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "go", + "maven", + "npm", + "nuget", + "packagist", + "pypi", + "rubygems" + ] + }, + "default": [ + "go", + "maven", + "npm", + "nuget", + "packagist", + "pypi", + "rubygems" + ] + }, + "mergeConfidenceEndpoint": { + "description": "If set, Renovate will query this API for Merge Confidence data.", + "type": "string", + "default": "https://developer.mend.io/" + }, "meteor": { "description": "Configuration object for the meteor manager", "type": "object", @@ -2312,7 +2342,7 @@ "type": "string" }, "matchCurrentValue": { - "description": "A regex to match against the raw `currentValue` string of a dependency. Valid only within a `packageRules` object.", + "description": "A regex or glob pattern to match against the raw `currentValue` string of a dependency. Valid only within a `packageRules` object.", "type": "string" }, "matchCurrentVersion": { @@ -2413,7 +2443,7 @@ ] }, "matchNewValue": { - "description": "A regex to match against the raw `newValue` string of a dependency. Valid only within a `packageRules` object.", + "description": "A regex or glob pattern to match against the raw `newValue` string of a dependency. Valid only within a `packageRules` object.", "type": "string" }, "matchPackageNames": { @@ -2540,6 +2570,11 @@ } ] }, + "prPriority": { + "description": "Set sorting priority for PR creation. PRs with higher priority are created first, negative priority last.", + "type": "integer", + "default": 0 + }, "replacementName": { "description": "The name of the new dependency that replaces the old deprecated dependency.", "type": "string" @@ -2871,11 +2906,6 @@ "type": "integer", "default": 25 }, - "prPriority": { - "description": "Set sorting priority for PR creation. PRs with higher priority are created first, negative priority last.", - "type": "integer", - "default": 0 - }, "prTitle": { "description": "Pull Request title template. Inherits from `commitMessage` if null.", "type": "string", diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/dependabot.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/dependabot.sha256 index d7eb621d7..0a05a85fb 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/dependabot.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/dependabot.sha256 @@ -1 +1 @@ -f68c06703b5e0fa54ea5800d198dae1bcb1df99d26f9067d64f5df836402e12a \ No newline at end of file +f0cc3134ba2ed762c69b443b99dd0becbb1cb38cf8d3b8e24a698e8e402dbade \ No newline at end of file diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/github-workflows.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/github-workflows.sha256 index bcb785eaa..8590858e4 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/github-workflows.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/github-workflows.sha256 @@ -1 +1 @@ -94475510f33ed1503fa6f6899900927fa5693b4f9cf759209a0dc76a267af9a3 \ No newline at end of file +a0f68510704ee2f80583e797de6adbf6061c949226eeee584a74d381464f1531 \ No newline at end of file diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 index 6836b86b0..a1cac2ca9 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 @@ -1 +1 @@ -10aa04c61243926bcf00f3d1523dc7edd1a247f26e2790d155cb086bc46bd0f8 \ No newline at end of file +c12031e99497479db221a8728cf4d9a6a1b7d7af46ac737cd240c11537c16b91 \ No newline at end of file From ba016c69aec9ca8706a23da96e9f4c1a87604a96 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 19:27:37 +0000 Subject: [PATCH 02/15] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/python-jsonschema/check-jsonschema: 0.28.3 → 0.28.4](https://github.com/python-jsonschema/check-jsonschema/compare/0.28.3...0.28.4) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 42e4d53b8..b49f56e47 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # dogfood - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.3 + rev: 0.28.4 hooks: - id: check-dependabot - id: check-github-workflows From 5e31d3bab514a93593e29cfc99103baacf3e2368 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 05:03:07 +0000 Subject: [PATCH 03/15] Bump furo from 2024.4.27 to 2024.5.6 Bumps [furo](https://github.com/pradyunsg/furo) from 2024.4.27 to 2024.5.6. - [Release notes](https://github.com/pradyunsg/furo/releases) - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md) - [Commits](https://github.com/pradyunsg/furo/compare/2024.04.27...2024.05.06) --- updated-dependencies: - dependency-name: furo dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 6a0fb4f08..f58936aa4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,7 +47,7 @@ dev = docs = sphinx<8 sphinx-issues<5 - furo==2024.4.27 + furo==2024.5.6 [isort] profile = black From 2a91d30eac8ae85192fd05656c0ed75679f38e9a Mon Sep 17 00:00:00 2001 From: sirosen <1300022+sirosen@users.noreply.github.com> Date: Sun, 2 Jun 2024 04:24:17 +0000 Subject: [PATCH 04/15] [vendor-schemas] automated update --- CHANGELOG.rst | 2 +- .../vendor/github-actions.json | 25 ++++++++++++++++--- .../vendor/github-workflows.json | 2 +- .../builtin_schemas/vendor/readthedocs.json | 2 +- .../builtin_schemas/vendor/renovate.json | 8 ++++-- .../vendor/sha256/github-actions.sha256 | 2 +- .../vendor/sha256/github-workflows.sha256 | 2 +- .../vendor/sha256/readthedocs.sha256 | 2 +- .../vendor/sha256/renovate.sha256 | 2 +- 9 files changed, 34 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 057ce487c..c1d67616f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,7 +10,7 @@ Unreleased .. vendor-insert-here -- Update vendored schemas (2024-05-26) +- Update vendored schemas (2024-06-02) 0.28.4 ------ diff --git a/src/check_jsonschema/builtin_schemas/vendor/github-actions.json b/src/check_jsonschema/builtin_schemas/vendor/github-actions.json index 123ac7444..c31b2ff40 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/github-actions.json +++ b/src/check_jsonschema/builtin_schemas/vendor/github-actions.json @@ -129,10 +129,27 @@ "env": { "$comment": "https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsenv", "description": "Sets a map of environment variables for only that step.", - "type": "object", - "additionalProperties": { - "type": "string" - } + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "$ref": "#/definitions/stringContainingExpressionSyntax" + } + ] }, "continue-on-error": { "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error", diff --git a/src/check_jsonschema/builtin_schemas/vendor/github-workflows.json b/src/check_jsonschema/builtin_schemas/vendor/github-workflows.json index bbd3cf766..169ee52f9 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/github-workflows.json +++ b/src/check_jsonschema/builtin_schemas/vendor/github-workflows.json @@ -634,7 +634,7 @@ ] }, "outputs": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjobs_idoutputs", + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs", "description": "A map of outputs for a job. Job outputs are available to all downstream jobs that depend on this job.", "type": "object", "additionalProperties": { diff --git a/src/check_jsonschema/builtin_schemas/vendor/readthedocs.json b/src/check_jsonschema/builtin_schemas/vendor/readthedocs.json index aec2a619b..63a4bc13b 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/readthedocs.json +++ b/src/check_jsonschema/builtin_schemas/vendor/readthedocs.json @@ -232,7 +232,7 @@ "properties": { "install": { "title": "Install", - "description": "Installation of packages and requiremens.", + "description": "Installation of packages and requirements.", "type": "array", "items": { "anyOf": [ diff --git a/src/check_jsonschema/builtin_schemas/vendor/renovate.json b/src/check_jsonschema/builtin_schemas/vendor/renovate.json index d60129107..63d84bd82 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/renovate.json +++ b/src/check_jsonschema/builtin_schemas/vendor/renovate.json @@ -965,7 +965,7 @@ "dockerSidecarImage": { "description": "Change this value to override the default Renovate sidecar image.", "type": "string", - "default": "ghcr.io/containerbase/sidecar:10.6.15" + "default": "ghcr.io/containerbase/sidecar:10.7.0" }, "dockerUser": { "description": "Set the `UID` and `GID` for Docker-based binaries if you use `binarySource=docker`.", @@ -1025,6 +1025,10 @@ "default": null, "$ref": "#" }, + "encryptedWarning": { + "description": "Warning text to use if encrypted config is found.", + "type": "string" + }, "endpoint": { "description": "Custom endpoint to use.", "type": "string", @@ -1690,7 +1694,7 @@ "default": [] }, "inheritConfig": { - "description": "If `true`, Renovate will inherit configuration from the `inheritConfigFileName` file in `inheritConfigRepoName", + "description": "If `true`, Renovate will inherit configuration from the `inheritConfigFileName` file in `inheritConfigRepoName`.", "type": "boolean", "default": false }, diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/github-actions.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/github-actions.sha256 index 14c4bfe10..8e70152ea 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/github-actions.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/github-actions.sha256 @@ -1 +1 @@ -d6da49b4fca964c06525a7a39fb9d346ba7a5ee0ed185ce8f74c7a4e91c7b6c7 \ No newline at end of file +589d4a1519173a8659b097ffdf5bdd00aa20fa4296720fe39c8a3a43c849dd6b \ No newline at end of file diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/github-workflows.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/github-workflows.sha256 index 8590858e4..3af70e93e 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/github-workflows.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/github-workflows.sha256 @@ -1 +1 @@ -a0f68510704ee2f80583e797de6adbf6061c949226eeee584a74d381464f1531 \ No newline at end of file +2151f3b2f5cf7a4ef37147635ef67d9a5b1813af59ad27417fda9b92a48d7910 \ No newline at end of file diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/readthedocs.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/readthedocs.sha256 index e5d99c308..a35f90b20 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/readthedocs.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/readthedocs.sha256 @@ -1 +1 @@ -eb41b78f09663bcfc413695cfa1ad317bb97789397a10eebfe174f88ef03e9d4 \ No newline at end of file +ef1d80216d9d0e6a8927513418e14efd90dc5a65e90828124b517785afa70bc8 \ No newline at end of file diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 index a1cac2ca9..de0ce8ee4 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 @@ -1 +1 @@ -c12031e99497479db221a8728cf4d9a6a1b7d7af46ac737cd240c11537c16b91 \ No newline at end of file +2513703e76b727801b472113f6f1cc379fa9a07be8aad6415e1a84ee15d40349 \ No newline at end of file From 81c95511cb7e391aa7b7f4488a70366ba04135ed Mon Sep 17 00:00:00 2001 From: Craig Davis Date: Mon, 10 Jun 2024 12:24:13 -0700 Subject: [PATCH 05/15] Update the bitbucket schema to use intellij plugin following SchemaStore. Fixes #440 --- src/check_jsonschema/catalog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/check_jsonschema/catalog.py b/src/check_jsonschema/catalog.py index 4fea96c86..cdaf9159d 100644 --- a/src/check_jsonschema/catalog.py +++ b/src/check_jsonschema/catalog.py @@ -4,7 +4,7 @@ def _bitbucket_pipelines_url() -> str: - return "https://bitbucket.org/atlassianlabs/atlascode/raw/main/resources/schemas/pipelines-schema.json" # noqa: E501 + return "https://bitbucket.org/atlassianlabs/intellij-bitbucket-references-plugin/raw/master/src/main/resources/schemas/bitbucket-pipelines.schema.json" # noqa: E501 def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str: From 3d0441f84c9739b65359b515f5f1891f5cc28ed5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 19:38:29 +0000 Subject: [PATCH 06/15] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.15.2 → v3.16.0](https://github.com/asottile/pyupgrade/compare/v3.15.2...v3.16.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b49f56e47..4bd0b31bb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,7 +39,7 @@ repos: hooks: - id: isort - repo: https://github.com/asottile/pyupgrade - rev: v3.15.2 + rev: v3.16.0 hooks: - id: pyupgrade args: ["--py37-plus"] From 20d16a0756ce3d3e799c7c7d3a57ce58b0c94c94 Mon Sep 17 00:00:00 2001 From: sirosen <1300022+sirosen@users.noreply.github.com> Date: Sun, 9 Jun 2024 04:23:32 +0000 Subject: [PATCH 07/15] [vendor-schemas] automated update --- CHANGELOG.rst | 2 +- .../builtin_schemas/vendor/gitlab-ci.json | 6 +++++- .../builtin_schemas/vendor/renovate.json | 12 ++++++++++-- .../builtin_schemas/vendor/sha256/gitlab-ci.sha256 | 2 +- .../builtin_schemas/vendor/sha256/renovate.sha256 | 2 +- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c1d67616f..baacc5bae 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,7 +10,7 @@ Unreleased .. vendor-insert-here -- Update vendored schemas (2024-06-02) +- Update vendored schemas (2024-06-09) 0.28.4 ------ diff --git a/src/check_jsonschema/builtin_schemas/vendor/gitlab-ci.json b/src/check_jsonschema/builtin_schemas/vendor/gitlab-ci.json index a4f9bad94..d6d427b82 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/gitlab-ci.json +++ b/src/check_jsonschema/builtin_schemas/vendor/gitlab-ci.json @@ -1318,7 +1318,7 @@ "type": "integer", "description": "Creates N instances of the job that run in parallel.", "default": 0, - "minimum": 2, + "minimum": 1, "maximum": 200 }, { @@ -1879,6 +1879,10 @@ "start_in": { "$ref": "#/definitions/start_in" }, + "manual_confirmation": { + "markdownDescription": "Describes the Custom confirmation message for a manual job [Learn More](https://docs.gitlab.com/ee/ci/yaml/#when).", + "type": "string" + }, "dependencies": { "type": "array", "description": "Specify a list of job names from earlier stages from which artifacts should be loaded. By default, all previous artifacts are passed. Use an empty array to skip downloading artifacts.", diff --git a/src/check_jsonschema/builtin_schemas/vendor/renovate.json b/src/check_jsonschema/builtin_schemas/vendor/renovate.json index 63d84bd82..ca0c96535 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/renovate.json +++ b/src/check_jsonschema/builtin_schemas/vendor/renovate.json @@ -965,7 +965,7 @@ "dockerSidecarImage": { "description": "Change this value to override the default Renovate sidecar image.", "type": "string", - "default": "ghcr.io/containerbase/sidecar:10.7.0" + "default": "ghcr.io/containerbase/sidecar:10.11.1" }, "dockerUser": { "description": "Set the `UID` and `GID` for Docker-based binaries if you use `binarySource=docker`.", @@ -2181,7 +2181,7 @@ "description": "A version range or regex pattern capturing allowed versions for dependencies.", "type": "string" }, - "customChangelogUrl": { + "changelogUrl": { "description": "If set, Renovate will use this URL to fetch changelogs for a matched dependency. Valid only within a `packageRules` object.", "type": "string" }, @@ -2591,6 +2591,14 @@ "replacementVersion": { "description": "The version of the new dependency that replaces the old deprecated dependency.", "type": "string" + }, + "sourceDirectory": { + "description": "The source directory in which the package is present at its source.", + "type": "string" + }, + "sourceUrl": { + "description": "The source URL of the package.", + "type": "string" } } } diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/gitlab-ci.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/gitlab-ci.sha256 index 1458e5dba..800c34c20 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/gitlab-ci.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/gitlab-ci.sha256 @@ -1 +1 @@ -054a4427c1c6e89ebf466b535a51e550660f9bf76ff9d2b3b8f0da1b0c24c64f \ No newline at end of file +03fdf88d444e16e704decde1792a9eb643c240f327cb14bc9a81c11ee0870946 \ No newline at end of file diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 index de0ce8ee4..18d143543 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 @@ -1 +1 @@ -2513703e76b727801b472113f6f1cc379fa9a07be8aad6415e1a84ee15d40349 \ No newline at end of file +98bc78083c3cc4d03f820b6e615bd91d892102ba62b08d129da7e419b7c76556 \ No newline at end of file From e5bd27dfb399778ac68359e86ba39c0ae88b3eb4 Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Mon, 10 Jun 2024 14:54:44 -0500 Subject: [PATCH 08/15] Update bitbucket schema by pulling from new URL Also add the relevant changelog entry --- CHANGELOG.rst | 5 +- .../vendor/bitbucket-pipelines.json | 1565 +++++++++-------- .../vendor/sha256/bitbucket-pipelines.sha256 | 2 +- 3 files changed, 883 insertions(+), 689 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index baacc5bae..24eff2ad3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,7 +10,10 @@ Unreleased .. vendor-insert-here -- Update vendored schemas (2024-06-09) +- Update vendored schemas (2024-06-10) +- Update bitbucket schema to use the option from the + intellij-bitbucket-references-plugin . For more details on this decision, see + :issue:`440` . Thanks @blade2005 for the PR! (:pr:`442`) 0.28.4 ------ diff --git a/src/check_jsonschema/builtin_schemas/vendor/bitbucket-pipelines.json b/src/check_jsonschema/builtin_schemas/vendor/bitbucket-pipelines.json index 2ba21952e..6d4676a68 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/bitbucket-pipelines.json +++ b/src/check_jsonschema/builtin_schemas/vendor/bitbucket-pipelines.json @@ -1,745 +1,936 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://bitbucket.org/product/features/pipelines", - "title": "Bitbucket Pipelines Schema", - "type": "object", - "properties": { - "image": { - "$ref": "#/definitions/image", - "default": "atlassian/default-image:latest" + "$id": "https://bitbucket.org/product/features/pipelines", + "$ref": "#/components/schemas/pipelines_configuration", + "$schema": "http://json-schema.org/draft-07/schema#", + "components": { + "schemas": { + "artifacts": { + "oneOf": [ + { + "$ref": "#/components/schemas/artifacts_paths" + }, + { + "$ref": "#/components/schemas/artifacts_expanded" + } + ] + }, + "artifacts_expanded": { + "properties": { + "download": { + "default": true, + "description": "Enables downloading of all available artifacts at the start of a step.", + "type": "boolean" + }, + "paths": { + "$ref": "#/components/schemas/artifacts_paths" + } }, - "clone": { - "$ref": "#/definitions/clone" + "type": "object" + }, + "artifacts_paths": { + "items": { + "description": "Glob pattern for the path to the artifacts.", + "title": "Artifact Path Pattern", + "type": "string" }, - "options": { - "$ref": "#/definitions/options" - }, - "definitions": { - "$ref": "#/definitions/definitions" - }, - "pipelines": { - "$ref": "#/definitions/pipelines" - }, - "export": { - "type": "boolean", - "title": "Enable pipelines config sharing", - "description": "Allows other Bitbucket repositories to import pipeline configurations from this file. A shared pipeline definition can't contain another `import` property." - } - }, - "additionalProperties": false, - "anyOf": [ - { + "minItems": 1, + "type": "array" + }, + "cache": { + "properties": { + "key": { + "properties": { + "files": { + "description": "Checksum of these file paths will be used to generate the cache key.", + "items": { + "description": "Path to a file or glob pattern of files in the repository which form the cache key.", + "type": "string" + }, + "minItems": 1, + "type": "array" + } + }, "required": [ - "pipelines" - ] + "files" + ], + "title": "Cache Key", + "type": "object" + }, + "path": { + "description": "Path to the directory to be cached, can be absolute or relative to the clone directory.", + "title": "Cache Path", + "type": "string" + } }, - { - "required": [ - "definitions", - "export" - ] - } - ], - "definitions": { - "pipelines": { - "type": "object", - "title": "Build pipelines", - "description": "The start of your pipelines definitions. Under this keyword you must define your build pipelines using at least one of the following:\n\n * default (for all branches that don't match any of the following)\n * branches (Git and Mercurial)\n * tags (Git)\n * bookmarks (Mercurial)", + "required": [ + "path" + ], + "title": "Cache", + "type": "object" + }, + "clone": { + "description": "Settings for cloning a repository into a container.", + "properties": { + "depth": { + "default": 50, + "description": "The depth argument of Git clone operation. It can be either number or \"full\" value", + "example": "full", + "oneOf": [ + { + "minimum": 1, + "type": "integer" + }, + { + "enum": [ + "full" + ], + "type": "string" + } + ], + "title": "Git Clone Depth" + }, + "enabled": { + "default": true, + "description": "Enables cloning of the repository.", + "type": "boolean" + }, + "filter": { + "description": "The partial clone filter argument of Git fetch operation. It can be either \"blob:none\" or \"tree:\" value", + "type": "string" + }, + "lfs": { + "default": false, + "description": "Enables the download of files from LFS storage when cloning.", + "type": "boolean" + }, + "skip-ssl-verify": { + "default": false, + "description": "Disables SSL verification during Git clone operation, allowing the use of self-signed certificates.", + "type": "boolean" + }, + "sparse-checkout": { + "description": "When this is provided, the repository will be cloned using sparse checkout using the provided settings.", "properties": { - "branches": { - "type": "object", - "title": "Branch-specific build pipelines", - "description": "Defines a section for all branch-specific build pipelines. The names or expressions in this section are matched against:\n\n * branches in your Git repository\n * named branches in your Mercurial repository\n\nYou can use glob patterns for handling the branch names.", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/steps" - }, - { - "$ref": "#/definitions/import" - } - ] - }, - "minProperties": 1 - }, - "bookmarks": { - "type": "object", - "title": "Bookmark-specific build pipelines (to be used in Mercurial repositories)", - "description": "Defines all bookmark-specific build pipelines. \n\nThe names or expressions in this section are matched against bookmarks in your Mercurial repository. \n\nYou can use glob patterns for handling the tag names.", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/steps" - }, - { - "$ref": "#/definitions/import" - } - ] - }, - "minProperties": 1 - }, - "custom": { - "type": "object", - "title": "Manually triggered build pipelines", - "description": "Defines pipelines that can only be triggered manually or scheduled from the Bitbucket Cloud interface.", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/stepsWithVariables" - }, - { - "$ref": "#/definitions/import" - } - ] - }, - "minProperties": 1 - }, - "tags": { - "type": "object", - "title": "Tag-specific build pipelines", - "description": "Defines all tag-specific build pipelines. \n\nThe names or expressions in this section are matched against tags and annotated tags in your Git repository. \n\nYou can use glob patterns for handling the tag names.", - "additionalProperties": { - "$ref": "#/definitions/steps" - }, - "minProperties": 1 - }, - "pull-requests": { - "type": "object", - "title": "Pull-request-specific build pipelines", - "description": "A special pipeline which only runs on pull requests. Pull-requests has the same level of indentation as branches.\n\nThis type of pipeline runs a little differently to other pipelines. When it's triggered, we'll merge the destination branch into your working branch before it runs. If the merge fails we will stop the pipeline.", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/steps" - }, - { - "$ref": "#/definitions/import" - } - ] - }, - "minProperties": 1 - }, - "default": { - "title": "Default build pipeline for branches", - "description": "The default pipeline runs on every push to the repository, unless a branch-specific pipeline is defined. \nYou can define a branch pipeline in the branches section.\n\nNote: The default pipeline doesn't run on tags or bookmarks.", - "anyOf": [ - { - "$ref": "#/definitions/steps" - }, - { - "$ref": "#/definitions/import" - } - ] - } + "cone-mode": { + "default": true, + "description": "Controls whether to use cone-mode or non-cone-mode.", + "type": "boolean" + }, + "enabled": { + "default": true, + "description": "Enables sparse checkout.", + "type": "boolean" + }, + "patterns": { + "description": "List of patterns to include in sparse checkout. The patterns should be directories or gitignore-style patterns based on the cone-mode settings.", + "items": { + "description": "A directory for cone-mode, or a gitignore-style pattern for no-cone-mode.", + "type": "string" + }, + "type": "array" + } }, - "additionalProperties": false + "title": "Sparse Checkout Settings", + "type": "object" + }, + "strategy": { + "default": "fetch", + "description": "Set the Git clone strategy to use. \"fetch\" is the new default strategy, \"clone\" is the legacy strategy.", + "enum": [ + "clone", + "fetch" + ], + "type": "string" + }, + "tags": { + "default": false, + "description": "Enables fetching tags when cloning.", + "type": "boolean" + } }, - "import": { - "type": "object", + "title": "Clone Repository Settings", + "type": "object" + }, + "condition": { + "properties": { + "changesets": { + "description": "Condition on the changesets involved in the pipeline.", "properties": { - "import": { - "type": "string", - "pattern": "^[^:]+:[^:]+:[^:]+$", - "title": "Location to import pipelines config from", - "description": "The import needs to match the following format: {repo-slug|repo-uuid}:{tag|branch-name}:{pipeline-name}" - } + "includePaths": { + "description": "Condition which holds only if any of the modified files match any of the specified patterns.", + "items": { + "description": "Glob pattern to match the file path.", + "title": "File Path Pattern", + "type": "string" + }, + "minItems": 1, + "title": "Include Paths", + "type": "array" + } }, - "additionalProperties": false + "required": [ + "includePaths" + ], + "title": "Changeset Condition", + "type": "object" + } }, - "stepsWithVariables": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "variables": { - "type": "array", - "description": "List of variables for the custom pipeline", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of a variable for the custom pipeline", - "minLength": 1 - } - }, - "additionalProperties": false - }, - "minItems": 1 - } - }, - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "step": { - "$ref": "#/definitions/step" - } - }, - "additionalProperties": false + "required": [ + "changesets" + ], + "type": "object" + }, + "custom_pipeline": { + "oneOf": [ + { + "$ref": "#/components/schemas/items_with_variables" + }, + { + "$ref": "#/components/schemas/import_pipeline" + } + ] + }, + "fail_fast": { + "default": false, + "title": "Fail Fast", + "type": "boolean" + }, + "image": { + "oneOf": [ + { + "$ref": "#/components/schemas/image_no_auth" + }, + { + "$ref": "#/components/schemas/image_basic_auth" + }, + { + "$ref": "#/components/schemas/image_aws_auth" + }, + { + "$ref": "#/components/schemas/image_name" + } + ] + }, + "image_aws_auth": { + "allOf": [ + { + "$ref": "#/components/schemas/image_base" + }, + { + "properties": { + "aws": { + "oneOf": [ + { + "properties": { + "access-key": { + "description": "The access key for Amazon Elastic Container Registry (AWS ECR).", + "title": "AWS Access Key", + "type": "string" + }, + "secret-key": { + "description": "The secret key for Amazon Elastic Container Registry (AWS ECR).", + "title": "AWS Secret Key", + "type": "string" + } }, - { - "type": "object", - "properties": { - "parallel": { - "$ref": "#/definitions/parallel" - } - }, - "additionalProperties": false - } - ] - }, - "minItems": 1 - }, - "steps": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "step": { - "$ref": "#/definitions/step" - } - }, - "additionalProperties": false + "required": [ + "access-key", + "secret-key" + ], + "type": "object" + }, + { + "properties": { + "oidc-role": { + "description": "OIDC role with access to private Docker images hosted in Amazon Elastic Container Registry (AWS ECR).", + "title": "OpenID Connect Role", + "type": "string" + } }, - { - "type": "object", - "properties": { - "parallel": { - "$ref": "#/definitions/parallel" - } - }, - "additionalProperties": false - } + "required": [ + "oidc-role" + ], + "type": "object" + } ] + } }, - "minItems": 1 + "required": [ + "aws" + ], + "type": "object" + } + ] + }, + "image_base": { + "description": "The parameters of the Docker image to use when running a step.", + "properties": { + "name": { + "$ref": "#/components/schemas/image_name" + }, + "run-as-user": { + "default": 0, + "description": "The UID of a user in the docker image to run as. Overrides image's default user, specified user UID must be an existing user in the image with a valid home directory.", + "title": "User ID", + "type": "integer" + } }, - "step": { - "type": "object", - "title": "Build execution unit", - "description": "Define s a build execution unit. \n\nSteps are executed in the order that they appear in the bitbucket-pipelines.yml file. \nYou can use up to 10 steps in a pipeline.", + "required": [ + "name" + ], + "title": "Docker Image Configuration", + "type": "object" + }, + "image_basic_auth": { + "allOf": [ + { + "$ref": "#/components/schemas/image_base" + }, + { "properties": { - "name": { - "type": "string", - "title": "Name of the step", - "description": "You can add a name to a step to make displays and reports easier to read and understand.", - "minLength": 1 - }, - "runs-on": { - "$ref": "#/definitions/runs-on", - "description": "self-hosted runner labels" - }, - "image": { - "$ref": "#/definitions/image" - }, - "max-time": { - "$ref": "#/definitions/max-time" - }, - "size": { - "$ref": "#/definitions/size" - }, - "script": { - "$ref": "#/definitions/script", - "description": "Commands to execute in the step" - }, - "after-script": { - "$ref": "#/definitions/script", - "title": "Commands to execute after the step succeeds or fails", - "description": "Commands inside an after-script section will run when the step succeeds or fails. This could be useful for clean up commands, test coverage, notifications, or rollbacks you might want to run, especially if your after-script uses the value of BITBUCKET_EXIT_CODE.\n\nNote: If any commands in the after-script section fail:\n\n* we won't run any more commands in that section\n\n* it will not effect the reported status of the step." - }, - "artifacts": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "string", - "description": "Glob pattern for the path to the artifacts", - "minLength": 1 - } - }, - { - "type": "object", - "title": "Files produced by a step to share with a following step", - "description": "Defines files to be shared from one step to a later step in your pipeline. Artifacts can be defined using glob patterns.", - "properties": { - "download": { - "type": "boolean", - "description": "Indicates whether to download artifact in the step" - }, - "paths": { - "type": "array", - "items": { - "type": "string", - "description": "Glob pattern for the path to the artifacts", - "minLength": 1 - } - } - }, - "required": [ - "paths" - ], - "minItems": 1 - } - ] - }, - "caches": { - "type": "array", - "description": "Caches enabled for the step", - "items": { - "type": "string", - "description": "Name of the cache", - "minLength": 1 - }, - "minItems": 1 - }, - "clone": { - "$ref": "#/definitions/clone" - }, - "services": { - "type": "array", - "description": "Services enabled for the step", - "items": { - "type": "string", - "description": "Name of the service", - "minLength": 1 - }, - "minItems": 1, - "maxItems": 5 - }, - "trigger": { - "type": "string", - "title": "Step trigger type", - "description": "Specifies whether a step will run automatically or only after someone manually triggers it. You can define the trigger type as manual or automatic. If the trigger type is not defined, the step defaults to running automatically. The first step cannot be manual. If you want to have a whole pipeline only run from a manual trigger then use a custom pipeline.", - "enum": [ - "automatic", - "manual" - ], - "default": "automatic" - }, - "deployment": { - "type": "string", - "title": "Type of environment for the deployment step", - "description": "Sets the type of environment for your deployment step, used in the Deployments dashboard.", - "minLength": 1 - }, - "oidc": { - "type": "boolean", - "title": "OpenID Connect", - "description": "Enables the use of OpenID Connect with Pipelines and your resource server. The oidc value must be set to true to set up and configure OpenID Connect.", - "default": false - }, - "condition": { - "type": "object", - "title": "Execute step when only condition is satisfied", - "description": "Allows for steps to execute when certain conditions or rules are satisfied", - "properties": { - "changesets": { - "type": "object", - "properties": { - "includePaths": { - "type": "array", - "title": "List of paths for changeset condition." - } - } - } - } - } + "password": { + "description": "The password to use when fetching the Docker image.", + "title": "Docker Registry Password", + "type": "string" + }, + "username": { + "description": "The username to use when fetching the Docker image.", + "title": "Docker Registry Username", + "type": "string" + } }, "required": [ - "script" + "username", + "password" ], - "additionalProperties": false - }, - "parallel": { - "type": "array", - "title": "Set of steps to run concurrently", - "description": "Parallel steps enable you to build and test faster, by running a set of steps at the same time.\n\nThe total number of build minutes used by a pipeline will not change if you make the steps parallel, but you'll be able to see the results sooner.\n\nThere is a limit of 10 for the total number of steps you can run in a pipeline, regardless of whether they are running in parallel or serial.", - "items": { - "type": "object", - "properties": { - "step": { - "$ref": "#/definitions/step" - } - }, - "additionalProperties": false + "type": "object" + } + ] + }, + "image_name": { + "default": "atlassian/default-image:latest", + "description": "The name of the Docker image which may or may not include registry URL, tag, and digest value.", + "title": "Docker Image Name", + "type": "string" + }, + "image_no_auth": { + "allOf": [ + { + "$ref": "#/components/schemas/image_base" + }, + { + "properties": { + "aws": { + "not": {} + }, + "password": { + "not": {} + }, + "username": { + "not": {} + } }, - "minItems": 2 + "type": "object" + } + ] + }, + "import_pipeline": { + "additionalProperties": false, + "properties": { + "import": { + "description": "The import needs to match the following format: {repo-slug|repo-uuid}:{tag-name|branch-name}:{pipeline-name}.", + "pattern": "^[^:]+:[^:]+:[^:]+$", + "title": "Identifier of the pipeline configuration to import", + "type": "string" + } }, - "script": { - "description": "Contains a list of commands that are executed in sequence. \n\nScripts are executed in the order in which they appear in a step. \n\nWe recommend that you move large scripts to a separate script file and call it from the bitbucket-pipelines.yml.", - "type": "array", - "items": { - "oneOf": [ - { - "type": "string", - "description": "Command to execute", - "minLength": 1 - }, - { - "$ref": "#/definitions/pipe" - } - ] + "required": [ + "import" + ], + "type": "object" + }, + "items": { + "description": "List of steps, stages and parallel groups of the pipeline.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/step_item" }, - "minItems": 1 - }, - "runs-on": { - "description": "self-hosted runner labels", - "type": "array", - "items": { - "type": "string", - "description": "self-hosted runner label", - "minLength": 1 + { + "$ref": "#/components/schemas/parallel_item" + }, + { + "$ref": "#/components/schemas/stage_item" } + ] }, - "pipe": { - "type": "object", - "title": "Pipe to execute", - "description": "Pipes make complex tasks easier, by doing a lot of the work behind the scenes.\nThis means you can just select which pipe you want to use, and supply the necessary variables.\nYou can look at the repository for the pipe to see what commands it is running.\n\nLearn more about pipes: https://confluence.atlassian.com/bitbucket/pipes-958765631.html", - "properties": { - "pipe": { - "type": "string", - "title": "Pipe identifier", - "description": "Pipes make complex tasks easier, by doing a lot of the work behind the scenes.\nThis means you can just select which pipe you want to use, and supply the necessary variables.\nYou can look at the repository for the pipe to see what commands it is running.\n\nLearn more about pipes: https://confluence.atlassian.com/bitbucket/pipes-958765631.html", - "minLength": 1 - }, - "variables": { - "type": "object", - "description": "Environment variables passed to the pipe", - "additionalProperties": { - "type": "string", - "description": "Environment variable value", - "minLength": 1 - }, - "minProperties": 1 - } + "minItems": 1, + "title": "Pipeline Items", + "type": "array" + }, + "items_with_variables": { + "description": "List of variables, steps, stages and parallel groups of the custom pipeline.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/variables_item" }, - "required": [ - "pipe" - ], - "additionalProperties": false - }, - "definitions": { - "type": "object", - "title": "Defines resources used elsewhere in the pipeline configuration", - "description": "Define resources used elsewhere in your pipeline configuration. \nResources can include:\n\n* services that run in separate Docker containers – see https://confluence.atlassian.com/x/gC8kN\n\n* caches – see https://confluence.atlassian.com/x/bA1hNQ#Cachingdependencies-custom-caches\n\n* YAML anchors - a way to define a chunk of your yaml for easy re-use - see https://confluence.atlassian.com/bitbucket/yaml-anchors-960154027.html", - "properties": { - "services": { - "$ref": "#/definitions/services" - }, - "caches": { - "$ref": "#/definitions/caches" - }, - "pipelines": { - "$ref": "#/definitions/pipelinesUnderDefinitions" - } + { + "$ref": "#/components/schemas/step_item" + }, + { + "$ref": "#/components/schemas/parallel_item" + }, + { + "$ref": "#/components/schemas/stage_item" } + ] }, - "pipelinesUnderDefinitions": { - "type": "object", - "title": "Pipeline definitions that are defined to be used elsewhere", - "description": "Defines pipelines that can be used under root level pipelines section.", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/stepsWithVariables" - } - ] - }, - "minProperties": 1 + "minItems": 1, + "title": "Custom Pipeline Items", + "type": "array" + }, + "max_time": { + "default": 120, + "description": "The maximum time a step can execute for in minutes.", + "example": 60, + "exclusiveMinimum": 0, + "type": "integer" + }, + "parallel": { + "oneOf": [ + { + "$ref": "#/components/schemas/parallel_steps" + }, + { + "$ref": "#/components/schemas/parallel_expanded" + } + ] + }, + "parallel_expanded": { + "properties": { + "fail-fast": { + "$ref": "#/components/schemas/fail_fast", + "description": "Stop the whole parallel group in case one of its steps fails." + }, + "steps": { + "$ref": "#/components/schemas/parallel_steps" + } }, - "services": { - "type": "object", - "title": "Defines services that run in separate Docker containers", - "description": "Rather than trying to build all the resources you might need into one large image, we can spin up separate docker containers for services. This will tend to speed up the build, and makes it very easy to change a single service without having to redo your whole image.", - "additionalProperties": { - "type": "object", - "properties": { - "image": { - "$ref": "#/definitions/image" - }, - "variables": { - "type": "object", - "description": "Environment variables passed to the service container", - "additionalProperties": { - "type": "string", - "description": "Environment variable value", - "minLength": 1 - }, - "minProperties": 1 - }, - "memory": { - "type": "integer", - "description": "Memory limit for the service container, in megabytes", - "minimum": 128, - "default": 1024 - } - } - } + "required": [ + "steps" + ], + "type": "object" + }, + "parallel_item": { + "additionalProperties": false, + "properties": { + "parallel": { + "$ref": "#/components/schemas/parallel" + } }, - "cache-key-files": { - "type": "array", - "title": "Cache key", - "description": "Checksum of these file paths will be used to generate the cache key", - "items": { - "type": "string", - "description": "Glob pattern for the cache key files", - "minLength": 1 - } + "type": "object" + }, + "parallel_steps": { + "description": "List of steps in the parallel group to run concurrently.", + "items": { + "$ref": "#/components/schemas/step_item" }, - "caches": { - "type": "object", - "title": "Defines custom caches to be used by pipelines.", - "description": "Caching build dependencies and directories enables faster builds and reduces the number of consumed build minutes.\n\nLearn more about caches: https://support.atlassian.com/bitbucket-cloud/docs/cache-dependencies", - "patternProperties": { - "^(?!-)[-a-z0-9]{0,49}[a-z0-9]$": { - "oneOf": [ - { - "type": "string", - "title": "Path to the directory to be cached", - "description": "Path to the directory to be cached, can be absolute or relative to the clone directory", - "minLength": 1 - }, - { - "type": "object", - "title": "Caches", - "description": "Cache name", - "minLength": 2, - "properties": { - "key": { - "type": "object", - "title": "Cache key", - "description": "Checksum of these file paths will be used to generate the cache key", - "properties": { - "files": { - "$ref": "#/definitions/cache-key-files" - } - } - }, - "path": { - "type": "string", - "title": "Cache path", - "description": "Path to the directory to be cached, can be absolute or relative to the clone directory", - "minLength": 1 - } - }, - "required": [ - "key", - "path" - ], - "additionalProperties": false - } - ] + "minItems": 1, + "title": "Parallel Group Steps", + "type": "array" + }, + "pipe": { + "description": "The pipe to execute.", + "example": { + "pipe": "atlassian/test-pipe:2.2.0", + "variables": { + "BAZ": [ + "QUX", + "QUZ" + ], + "FOO": "BAR" + } + }, + "properties": { + "pipe": { + "description": "The full pipe identifier.", + "title": "Pipe Identifier", + "type": "string" + }, + "variables": { + "additionalProperties": { + "description": "Environment variable value", + "oneOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" } + ] }, - "not": { - "required": [ - "docker" - ] - }, - "additionalProperties": false + "description": "Environment variables passed to the pipe container.", + "title": "Pipe Variables", + "type": "object" + } }, - "options": { - "type": "object", - "title": "Global settings that apply to all pipelines", - "description": "Contains global settings that apply to all your pipelines. The main keyword you'd use here is max-time.", + "required": [ + "pipe" + ], + "title": "Pipe", + "type": "object" + }, + "pipeline": { + "oneOf": [ + { + "$ref": "#/components/schemas/items" + }, + { + "$ref": "#/components/schemas/import_pipeline" + } + ] + }, + "pipelines_configuration": { + "properties": { + "clone": { + "$ref": "#/components/schemas/clone" + }, + "definitions": { + "description": "The definitions of caches and services used in the declared pipelines.", "properties": { - "docker": { - "type": "boolean", - "description": "A flag to add Docker to all build steps in all pipelines" - }, - "max-time": { - "$ref": "#/definitions/max-time" - }, - "size": { - "$ref": "#/definitions/size" - } + "caches": { + "additionalProperties": { + "$ref": "#/components/schemas/cache" + }, + "title": "Custom cache definitions", + "type": "object" + }, + "pipelines": { + "additionalProperties": { + "$ref": "#/components/schemas/custom_pipeline" + }, + "description": "Definitions of the pipelines which can be used in other repositories of the same Bitbucket workspace.", + "title": "Shared pipeline definitions", + "type": "object" + }, + "services": { + "additionalProperties": { + "$ref": "#/components/schemas/service" + }, + "title": "Service definitions", + "type": "object" + } + }, + "title": "Global Definitions", + "type": "object" + }, + "export": { + "default": false, + "description": "Allows other Bitbucket repositories to import pipeline definitions from this file. A shared pipeline definition can't contain another `import` property.", + "title": "Enables shared pipelines definitions.", + "type": "boolean" + }, + "image": { + "$ref": "#/components/schemas/image" + }, + "labels": { + "description": "Additional key value data supplied in the configuration YAML.", + "example": { + "buildTool": "maven", + "jvm": "jdk17" + }, + "title": "Pipeline Labels", + "type": "object" + }, + "options": { + "description": "Global options allow to override the default values applied to all steps in all declared pipelines.", + "properties": { + "docker": { + "default": false, + "description": "Enables Docker service for every step.", + "type": "boolean" + }, + "max-time": { + "$ref": "#/components/schemas/max_time" + }, + "size": { + "$ref": "#/components/schemas/size" + } + }, + "title": "Global Options", + "type": "object" + }, + "pipelines": { + "properties": { + "branches": { + "additionalProperties": { + "$ref": "#/components/schemas/pipeline" + }, + "description": "Branch-specific build pipelines.", + "title": "Branch Pipelines", + "type": "object" + }, + "custom": { + "additionalProperties": { + "$ref": "#/components/schemas/custom_pipeline" + }, + "description": "Pipelines that can only be triggered manually or be scheduled.", + "title": "Custom Pipelines", + "type": "object" + }, + "default": { + "$ref": "#/components/schemas/pipeline", + "description": "Default pipeline runs on every push except for tags unless a branch-specific pipeline is defined.", + "title": "Default Pipeline" + }, + "pull-requests": { + "additionalProperties": { + "$ref": "#/components/schemas/pipeline" + }, + "description": "Pull-request-specific build pipelines.", + "title": "Pull Request Pipelines", + "type": "object" + }, + "tags": { + "additionalProperties": { + "$ref": "#/components/schemas/pipeline" + }, + "description": "Tag-specific build pipelines.", + "title": "Tag Pipelines", + "type": "object" + } }, - "additionalProperties": false + "title": "Pipelines", + "type": "object" + } }, - "max-time": { - "type": "integer", - "description": "Maximum amount of minutes a step can execute", - "minimum": 1, - "maximum": 120, - "default": 120 + "type": "object" + }, + "runs_on": { + "oneOf": [ + { + "$ref": "#/components/schemas/runs_on_item" + }, + { + "$ref": "#/components/schemas/runs_on_expanded" + } + ] + }, + "runs_on_expanded": { + "description": "Required labels of a runner to run the step.", + "example": [ + "self.hosted", + "linux" + ], + "items": { + "$ref": "#/components/schemas/runs_on_item" + }, + "maxItems": 10, + "minItems": 1, + "title": "Step Runner Labels", + "type": "array" + }, + "runs_on_item": { + "description": "Label of a runner.", + "maxLength": 50, + "title": "Step Runner Label", + "type": "string" + }, + "script": { + "items": { + "oneOf": [ + { + "description": "The command to execute.", + "example": "echo \"hello world\"", + "title": "Script Command", + "type": "string" + }, + { + "$ref": "#/components/schemas/pipe" + } + ] }, - "size": { - "type": "string", - "title": "Multiplier of the resources allocated to a pipeline step", - "description": "You can allocate additional resources to a step, or to the whole pipeline. \nBy specifying the size of 2x, you'll have double the resources available (eg. 4GB memory → 8GB memory).\n\nAt this time, valid sizes are 1x and 2x.", + "minItems": 1, + "type": "array" + }, + "service": { + "description": "Custom service properties", + "properties": { + "image": { + "$ref": "#/components/schemas/image" + }, + "memory": { + "default": 1024, + "description": "Memory limit for the service container, in megabytes.", + "minimum": 128, + "title": "Service Memory", + "type": "integer" + }, + "type": { + "description": "Specifies Docker service container (to run Docker-in-Docker).", "enum": [ - "1x", - "2x" + "docker" ], - "default": "1x" + "type": "string" + }, + "variables": { + "additionalProperties": { + "description": "Environment variable value", + "title": "Service Variable", + "type": "string" + }, + "description": "Environment variables passed to the service container.", + "minProperties": 1, + "title": "Service Variables", + "type": "object" + } }, - "clone": { - "type": "object", - "title": "Contains settings to clone the repository into a container", - "description": "Contains settings for when we clone your repository into a container. Settings here include:\n\n* lfs - Support for Git lfs\n\n* depth - the depth of the Git clone.", - "properties": { - "depth": { - "description": "Depth of Git clones for all pipelines (supported only for Git repositories)", - "oneOf": [ - { - "type": "integer", - "minimum": 1 - }, - { - "const": "full" + "title": "Service definition", + "type": "object" + }, + "size": { + "default": "1x", + "description": "The size of the step, sets the amount of resources allocated.", + "enum": [ + "1x", + "2x", + "4x", + "8x", + "16x" + ], + "title": "Step Size", + "type": "string" + }, + "stage": { + "properties": { + "condition": { + "$ref": "#/components/schemas/condition", + "description": "The condition to execute the stage.", + "title": "Stage Condition" + }, + "deployment": { + "description": "The deployment environment for the stage.", + "title": "Stage Deployment Environment", + "type": "string" + }, + "name": { + "description": "The name of the stage.", + "title": "Stage Name", + "type": "string" + }, + "steps": { + "description": "List of steps in the stage.", + "items": { + "properties": { + "step": { + "allOf": [ + { + "$ref": "#/components/schemas/step_base" + }, + { + "properties": { + "condition": { + "not": {} } - ], - "default": 50 - }, - "enabled": { - "type": "boolean", - "description": "Enables cloning of the repository", - "default": true - }, - "lfs": { - "type": "boolean", - "description": "Enables the download of LFS files in the clone (supported only for Git repositories)", - "default": false + }, + "type": "object" + } + ] } + }, + "type": "object" }, - "additionalProperties": false - }, - "runAsUser": { - "type": "integer", - "title": "The UID of a user in the docker image to run as", - "description": "Overrides image's default user, specified user UID must be an existing user in the image with a valid home directory" + "minItems": 1, + "title": "Stage Steps", + "type": "array" + }, + "trigger": { + "$ref": "#/components/schemas/trigger", + "description": "The trigger used for the pipeline stage.", + "title": "Stage Trigger" + } }, - "simpleImage": { - "type": "string", - "title": "Name of the Docker image which may or may not include registry URL, tag, and digest value", - "description": "The Docker container to run your builds.\n\nsee: https://confluence.atlassian.com/x/kYU5Lw for details", - "minLength": 1 + "required": [ + "steps" + ], + "type": "object" + }, + "stage_item": { + "additionalProperties": false, + "properties": { + "stage": { + "$ref": "#/components/schemas/stage" + } }, - "imageWithCustomUser": { - "type": "object", + "type": "object" + }, + "step": { + "allOf": [ + { + "$ref": "#/components/schemas/step_base" + }, + { "properties": { - "name": { - "$ref": "#/definitions/simpleImage" - }, - "run-as-user": { - "$ref": "#/definitions/runAsUser" - } + "condition": { + "$ref": "#/components/schemas/condition", + "description": "The condition to execute the step.", + "title": "Step Condition" + } }, - "required": [ - "name" - ], - "additionalProperties": false - }, - "privateImage": { - "type": "object", - "description": "A docker image hosted in a private repository", - "properties": { - "name": { - "$ref": "#/definitions/simpleImage" - }, - "username": { - "type": "string", - "description": "Username to use to fetch the Docker image", - "minLength": 1 - }, - "password": { - "type": "string", - "description": "Password to use to fetch the Docker image", - "minLength": 1 - }, - "email": { - "type": "string", - "description": "Email to use to fetch the Docker image", - "format": "email", - "minLength": 1 - }, - "run-as-user": { - "$ref": "#/definitions/runAsUser" - } + "type": "object" + } + ] + }, + "step_base": { + "properties": { + "after-script": { + "$ref": "#/components/schemas/script", + "description": "List of commands to execute after the step succeeds or fails.", + "title": "Step Post Script" + }, + "artifacts": { + "$ref": "#/components/schemas/artifacts" + }, + "caches": { + "description": "Caches enabled for the step.", + "items": { + "description": "Reference to a cache defined under global definitions.", + "title": "Cache Name", + "type": "string" }, - "required": [ - "name", - "username", - "password" - ], - "additionalProperties": false - }, - "awsImage": { - "type": "object", - "description": "A docker image hosted by AWS ECR", - "properties": { - "name": { - "$ref": "#/definitions/simpleImage" - }, - "aws": { - "$ref": "#/definitions/awsCredentials" - }, - "run-as-user": { - "$ref": "#/definitions/runAsUser" - } + "minItems": 1, + "title": "Step Caches", + "type": "array" + }, + "clone": { + "$ref": "#/components/schemas/clone" + }, + "deployment": { + "description": "The deployment environment for the step.", + "title": "Step Deployment Environment", + "type": "string" + }, + "fail-fast": { + "$ref": "#/components/schemas/fail_fast", + "description": "Stop the parent parallel group in case this step fails." + }, + "image": { + "$ref": "#/components/schemas/image" + }, + "max-time": { + "$ref": "#/components/schemas/max_time", + "title": "Step Maximum Time" + }, + "name": { + "description": "The name of the step.", + "example": "Build and test", + "title": "Step Name", + "type": "string" + }, + "oidc": { + "description": "Enables the use of OpenID Connect to connect a pipeline step to a resource server.", + "type": "boolean" + }, + "runs-on": { + "$ref": "#/components/schemas/runs_on" + }, + "script": { + "$ref": "#/components/schemas/script", + "description": "List of commands that are executed in sequence.", + "title": "Step Script" + }, + "services": { + "description": "Services enabled for the step.", + "items": { + "description": "Reference to a service defined under global definitions.", + "title": "Service Name", + "type": "string" }, - "required": ["name", "aws"], - "additionalProperties": false + "maxItems": 5, + "minItems": 1, + "title": "Step Services", + "type": "array" + }, + "size": { + "$ref": "#/components/schemas/size" + }, + "trigger": { + "$ref": "#/components/schemas/trigger", + "description": "The trigger used for the pipeline step.", + "title": "Step Trigger" + } }, - "awsCredentials": { - "oneOf": [ - { - "type": "object", - "description": "AWS credentials", - "properties": { - "access-key": { - "type": "string", - "description": "AWS Access Key", - "minLength": 1 - }, - "secret-key": { - "type": "string", - "description": "AWS Secret Key", - "minLength": 1 - } - }, - "required": [ - "access-key", - "secret-key" - ], - "additionalProperties": false - }, - { - "type": "object", - "description": "AWS credentials", - "properties": { - "oidc-role": { - "type": "string", - "description": "AWS IAM Role assumable using OpenID Connect", - "minLength": 1 - } - }, - "required": ["oidc-role"], - "additionalProperties": false - } - ] + "required": [ + "script" + ], + "title": "Pipeline Step", + "type": "object" + }, + "step_item": { + "additionalProperties": false, + "properties": { + "step": { + "$ref": "#/components/schemas/step" + } }, - "image": { - "oneOf": [ - { - "$ref": "#/definitions/simpleImage" + "type": "object" + }, + "trigger": { + "default": "automatic", + "enum": [ + "automatic", + "manual" + ], + "type": "string" + }, + "variables_item": { + "additionalProperties": false, + "properties": { + "variables": { + "description": "List of variables for the custom pipeline.", + "items": { + "description": "Settings for the custom variable.", + "properties": { + "allowed-values": { + "description": "A list of values that are allowed for the variable.", + "items": { + "title": "Allowed Variable Value", + "type": "string" + }, + "minItems": 1, + "title": "Allowed Variable Values", + "type": "array" }, - { - "$ref": "#/definitions/imageWithCustomUser" + "default": { + "title": "Default Variable Value", + "type": "string" }, - { - "$ref": "#/definitions/privateImage" + "description": { + "title": "Variable Description", + "type": "string" }, - { - "$ref": "#/definitions/awsImage" + "name": { + "title": "Variable Name", + "type": "string" } - ] - } + }, + "required": [ + "name" + ], + "title": "Custom Pipeline Variable", + "type": "object" + }, + "minItems": 1, + "title": "Custom Pipeline Variables", + "type": "array" + } + }, + "type": "object" + } } + } } diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/bitbucket-pipelines.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/bitbucket-pipelines.sha256 index 1b2fd95db..76e65e351 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/bitbucket-pipelines.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/bitbucket-pipelines.sha256 @@ -1 +1 @@ -c7952c6904acf687a2e9f048e2934f30900228fa8f8544cc8c9fe5ef1ce07ee4 \ No newline at end of file +60586ed3669f79395b4689de2e99d44876d4c83670e144b28f980d3aa414d795 \ No newline at end of file From feb8116436b17e9d00ae64e801457e6c2aaa04fa Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Mon, 10 Jun 2024 16:17:16 -0500 Subject: [PATCH 09/15] Bump version for release --- CHANGELOG.rst | 6 +++++- README.md | 2 +- docs/optional_parsers.rst | 4 ++-- docs/precommit_usage.rst | 38 +++++++++++++++++++------------------- setup.cfg | 2 +- 5 files changed, 28 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 24eff2ad3..d494f5e6e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,7 +10,11 @@ Unreleased .. vendor-insert-here -- Update vendored schemas (2024-06-10) +0.28.5 +------ + +- Update vendored schemas: bitbucket-pipelines, dependabot, github-actions, + github-workflows, gitlab-ci, readthedocs, renovate (2024-06-10) - Update bitbucket schema to use the option from the intellij-bitbucket-references-plugin . For more details on this decision, see :issue:`440` . Thanks @blade2005 for the PR! (:pr:`442`) diff --git a/README.md b/README.md index 74ecb33bf..8d36a65e7 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ files. ```yaml - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-github-workflows args: ["--verbose"] diff --git a/docs/optional_parsers.rst b/docs/optional_parsers.rst index f2d987d08..28ba310f6 100644 --- a/docs/optional_parsers.rst +++ b/docs/optional_parsers.rst @@ -20,7 +20,7 @@ For example, .. code-block:: yaml - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-renovate additional_dependencies: ['pyjson5'] @@ -45,7 +45,7 @@ For example, .. code-block:: yaml - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-jsonschema name: 'Check GitHub Workflows' diff --git a/docs/precommit_usage.rst b/docs/precommit_usage.rst index ee01ba98d..80dc6741b 100644 --- a/docs/precommit_usage.rst +++ b/docs/precommit_usage.rst @@ -17,7 +17,7 @@ You must specify a schema using pre-commit ``args`` configuration. :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-jsonschema files: ^data/.*\.json$ @@ -34,7 +34,7 @@ Validate JSON Schema files against their matching metaschema, as specified in th :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-metaschema files: ^schemas/.*\.json$ @@ -52,7 +52,7 @@ Validate Azure Pipelines config against the schema provided by Microsoft :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-azure-pipelines @@ -66,7 +66,7 @@ Validate Bamboo Specs against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-bamboo-spec @@ -80,7 +80,7 @@ Validate Bitbucket Pipelines against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-bitbucket-pipelines @@ -94,7 +94,7 @@ Validate Buildkite Pipelines against the schema provided by Buildkite :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-buildkite @@ -108,7 +108,7 @@ Validate Google Cloud Build config against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-cloudbuild @@ -122,7 +122,7 @@ Validate Dependabot Config (v2) against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-dependabot @@ -136,7 +136,7 @@ Validate Drone-CI Config against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-drone-ci @@ -150,7 +150,7 @@ Validate GitHub Actions against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-github-actions @@ -164,7 +164,7 @@ Validate GitHub Workflows against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-github-workflows @@ -178,7 +178,7 @@ Validate GitLab CI config against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-gitlab-ci @@ -192,7 +192,7 @@ Validate ReadTheDocs config against the schema provided by ReadTheDocs :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-readthedocs @@ -206,7 +206,7 @@ Validate Renovate config against the schema provided by Renovate (does not suppo :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-renovate @@ -220,7 +220,7 @@ Validate Taskfile config against the schema provided by Task :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-taskfile @@ -234,7 +234,7 @@ Validate Travis Config against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-travis @@ -248,7 +248,7 @@ Validate Woodpecker Config against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-woodpecker-ci @@ -274,7 +274,7 @@ manually, you could do this: .. code-block:: yaml - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-jsonschema name: "Check GitHub Workflows" @@ -293,7 +293,7 @@ To check with the builtin schema that a GitHub workflow sets .. code-block:: yaml - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-jsonschema name: "Check GitHub Workflows set timeout-minutes" diff --git a/setup.cfg b/setup.cfg index f58936aa4..beba77e43 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = check-jsonschema -version = 0.28.4 +version = 0.28.5 description = A jsonschema CLI and pre-commit hook long_description = file: README.md long_description_content_type = text/markdown From be87e7d1b2fceece3021b658d17ae7017320f346 Mon Sep 17 00:00:00 2001 From: Jordan Bradford <36420801+jrdnbradford@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:33:28 -0400 Subject: [PATCH 10/15] Add Circle CI hook --- .pre-commit-hooks.yaml | 10 + docs/precommit_usage.rst | 14 + docs/usage.rst | 1 + .../builtin_schemas/vendor/circle-ci.json | 1513 +++++++++++++++++ .../vendor/sha256/circle-ci.sha256 | 1 + src/check_jsonschema/catalog.py | 12 + 6 files changed, 1551 insertions(+) create mode 100644 src/check_jsonschema/builtin_schemas/vendor/circle-ci.json create mode 100644 src/check_jsonschema/builtin_schemas/vendor/sha256/circle-ci.sha256 diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 306f5f805..510426c5a 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -68,6 +68,16 @@ )$ types_or: [json,yaml] +# this hook is autogenerated from a script +# to modify this hook, update `src/check_jsonschema/catalog.py` +# and run `make generate-hooks` or `tox run -e generate-hooks-config` +- id: check-circle-ci + name: Validate Circle CI config + description: 'Validate Circle CI config against the schema provided by SchemaStore' + entry: check-jsonschema --builtin-schema vendor.circle-ci + language: python + files: ^\.circleci/config\.(yml|yaml)$ + # this hook is autogenerated from a script # to modify this hook, update `src/check_jsonschema/catalog.py` # and run `make generate-hooks` or `tox run -e generate-hooks-config` diff --git a/docs/precommit_usage.rst b/docs/precommit_usage.rst index 80dc6741b..93dc17b64 100644 --- a/docs/precommit_usage.rst +++ b/docs/precommit_usage.rst @@ -99,6 +99,20 @@ Validate Buildkite Pipelines against the schema provided by Buildkite - id: check-buildkite +``check-circle-ci`` +~~~~~~~~~~~~~~~~~~~ + +Validate Circle CI config against the schema provided by SchemaStore + +.. code-block:: yaml + :caption: example config + + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.28.5 + hooks: + - id: check-circle-ci + + ``check-cloudbuild`` ~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/usage.rst b/docs/usage.rst index bfe53db6f..1768c63c0 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -90,6 +90,7 @@ SchemaStore and other sources: - ``vendor.bamboo-spec`` - ``vendor.bitbucket-pipelines`` - ``vendor.buildkite`` +- ``vendor.circle-ci`` - ``vendor.cloudbuild`` - ``vendor.dependabot`` - ``vendor.drone-ci`` diff --git a/src/check_jsonschema/builtin_schemas/vendor/circle-ci.json b/src/check_jsonschema/builtin_schemas/vendor/circle-ci.json new file mode 100644 index 000000000..3cb9814d1 --- /dev/null +++ b/src/check_jsonschema/builtin_schemas/vendor/circle-ci.json @@ -0,0 +1,1513 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/circleciconfig.json", + "definitions": { + "logical": { + "description": "https://circleci.com/docs/configuration-reference#logic-statements \n\nA logical statement to be used in dynamic configuration", + "oneOf": [ + { + "type": ["string", "boolean", "integer", "number"] + }, + { + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "maxProperties": 1, + "properties": { + "and": { + "description": "https://circleci.com/docs/configuration-reference#logic-statements \n\nLogical and: true when all statements in the list are true", + "type": "array", + "items": { + "$ref": "#/definitions/logical" + } + }, + "or": { + "description": "https://circleci.com/docs/configuration-reference#logic-statements \n\nLogical or: true when at least one statements in the list is true", + "type": "array", + "items": { + "$ref": "#/definitions/logical" + } + }, + "not": { + "$ref": "#/definitions/logical", + "description": "https://circleci.com/docs/configuration-reference#logic-statements \n\nLogical not: true when statement is false" + }, + "equal": { + "description": "https://circleci.com/docs/configuration-reference#logic-statements \n\nTrue when all elements in the list are equal", + "type": "array" + }, + "matches": { + "description": "https://circleci.com/docs/configuration-reference#logic-statements \n\nTrue when value matches the pattern", + "type": "object", + "additionalProperties": false, + "properties": { + "pattern": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + } + ] + }, + "filter": { + "description": "A map defining rules for execution on specific branches", + "type": "object", + "additionalProperties": false, + "properties": { + "only": { + "description": "Either a single branch specifier, or a list of branch specifiers", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "ignore": { + "description": "Either a single branch specifier, or a list of branch specifiers", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + } + }, + "orbs": { + "description": "https://circleci.com/docs/configuration-reference#orbs-requires-version-21\n\nOrbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "description": "https://circleci.com/docs/creating-orbs#semantic-versioning-in-orbs\n\nAn orb to depend on and its semver range, or volatile for the most recent release.", + "type": "string", + "pattern": "^[a-z][a-z0-9_-]+/[a-z][a-z0-9_-]+@(dev:[\\.a-z0-9_-]+|\\d+|\\d+\\.\\d+|\\d+\\.\\d+\\.\\d+|volatile)$" + }, + { + "description": "https://circleci.com/docs/creating-orbs#creating-inline-orbs\n\nInline orbs can be handy during development of an orb or as a convenience for name-spacing jobs and commands in lengthy configurations, particularly if you later intend to share the orb with others.", + "type": "object", + "properties": { + "orbs": { + "$ref": "#/definitions/orbs" + }, + "commands": { + "$ref": "#/definitions/commands" + }, + "executors": { + "$ref": "#/definitions/executors" + }, + "jobs": { + "$ref": "#/definitions/jobs" + } + } + } + ] + } + }, + "commands": { + "description": "https://circleci.com/docs/configuration-reference#commands-requires-version-21\n\nA command definition defines a sequence of steps as a map to be executed in a job, enabling you to reuse a single command definition across multiple jobs.", + "type": "object", + "additionalProperties": { + "description": "https://circleci.com/docs/configuration-reference#commands-requires-version-21\n\nDefinition of a custom command.", + "type": "object", + "required": ["steps"], + "properties": { + "steps": { + "description": "A sequence of steps run inside the calling job of the command.", + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + }, + "parameters": { + "description": "https://circleci.com/docs/reusing-config#using-the-parameters-declaration\n\nA map of parameter keys.", + "type": "object", + "patternProperties": { + "^[a-z][a-z0-9_-]+$": { + "oneOf": [ + { + "description": "https://circleci.com/docs/reusing-config#string\n\nA string parameter.", + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["string"] + }, + "description": { + "type": "string" + }, + "default": { + "type": "string" + } + } + }, + { + "description": "https://circleci.com/docs/reusing-config#boolean\n\nA boolean parameter.", + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["boolean"] + }, + "description": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + }, + { + "description": "https://circleci.com/docs/reusing-config#integer\n\nAn integer parameter.", + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["integer"] + }, + "description": { + "type": "string" + }, + "default": { + "type": "integer" + } + } + }, + { + "description": "https://circleci.com/docs/reusing-config#enum\n\nThe `enum` parameter may be a list of any values. Use the `enum` parameter type when you want to enforce that the value must be one from a specific set of string values.", + "type": "object", + "required": ["type", "enum"], + "properties": { + "type": { + "enum": ["enum"] + }, + "enum": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "default": { + "type": "string" + } + } + }, + { + "description": "https://circleci.com/docs/reusing-config#executor\n\nUse an `executor` parameter type to allow the invoker of a job to decide what executor it will run on.", + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["executor"] + }, + "description": { + "type": "string" + }, + "default": { + "type": "string" + } + } + }, + { + "description": "https://circleci.com/docs/reusing-config#steps\n\nSteps are used when you have a job or command that needs to mix predefined and user-defined steps. When passed in to a command or job invocation, the steps passed as parameters are always defined as a sequence, even if only one step is provided.", + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["steps"] + }, + "description": { + "type": "string" + }, + "default": { + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + } + } + }, + { + "description": "https://circleci.com/docs/reusing-config#environment-variable-name\n\nThe environment variable name parameter is a string that must match a POSIX_NAME regexp (e.g. no spaces or special characters) and is a more meaningful parameter type that enables additional checks to be performed. ", + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["env_var_name"] + }, + "description": { + "type": "string" + }, + "default": { + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9_-]+$" + } + } + } + ] + } + } + }, + "description": { + "description": "A string that describes the purpose of the command.", + "type": "string" + } + } + } + }, + "dockerLayerCaching": { + "description": "Set to `true` to enable [Docker Layer Caching](https://circleci.com/docs/docker-layer-caching). Note: If you haven't already, you must open a support ticket to have a CircleCI Sales representative contact you about enabling this feature on your account for an additional fee.", + "type": "boolean", + "default": "true" + }, + "dockerExecutor": { + "description": "Options for the [docker executor](https://circleci.com/docs/configuration-reference/#docker)", + "required": ["docker"], + "properties": { + "docker": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": ["image"], + "properties": { + "image": { + "description": "The name of a custom docker image to use", + "type": "string" + }, + "name": { + "description": "The name the container is reachable by. By default, container services are accessible through `localhost`", + "type": "string" + }, + "entrypoint": { + "description": "The command used as executable when launching the container", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "command": { + "description": "The command used as pid 1 (or args for entrypoint) when launching the container", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "user": { + "description": "Which user to run the command as", + "type": "string" + }, + "environment": { + "description": "A map of environment variable names and values", + "type": "object", + "additionalProperties": { + "type": ["string", "number", "boolean"] + } + }, + "auth": { + "description": "Authentication for registries using standard `docker login` credentials", + "type": "object", + "additionalProperties": false, + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, + "aws_auth": { + "description": "Authentication for AWS EC2 Container Registry (ECR). You can use the access/secret keys or OIDC.", + "type": "object", + "additionalProperties": false, + "properties": { + "aws_access_key_id": { + "type": "string" + }, + "aws_secret_access_key": { + "type": "string" + }, + "oidc_role_arn": { + "type": "string" + } + } + } + } + } + }, + "resource_class": { + "$ref": "#/definitions/linuxResourceClass" + } + } + }, + "machineExecutor": { + "description": "Options for the [machine executor](https://circleci.com/docs/configuration-reference#machine)", + "type": "object", + "required": ["machine"], + "oneOf": [ + { + "properties": { + "machine": { "const": true }, + "resource_class": { + "anyOf": [ + { "$ref": "#/definitions/linuxResourceClass" }, + { "$ref": "#/definitions/selfHostedRunnerResourceClass" } + ] + } + } + }, + { + "properties": { + "machine": { + "type": "object", + "additionalProperties": false, + "properties": { + "image": { "$ref": "#/definitions/linuxMachineImage" }, + "resource_class": { + "$ref": "#/definitions/linuxResourceClass" + }, + "docker_layer_caching": { + "$ref": "#/definitions/dockerLayerCaching" + } + } + }, + "resource_class": { "$ref": "#/definitions/linuxResourceClass" } + }, + "dependencies": { + "resource_class": { + "not": { + "properties": { + "machine": { + "required": ["resource_class"] + } + } + } + } + } + }, + { + "properties": { + "machine": { + "type": "object", + "additionalProperties": false, + "required": ["image"], + "properties": { + "image": { "$ref": "#/definitions/windowsMachineImage" }, + "resource_class": { + "$ref": "#/definitions/windowsResourceClass" + } + } + }, + "resource_class": { "$ref": "#/definitions/windowsResourceClass" } + }, + "dependencies": { + "resource_class": { + "not": { + "properties": { + "machine": { + "required": ["resource_class"] + } + } + } + } + } + }, + { + "properties": { + "machine": { + "type": "object", + "additionalProperties": false, + "required": ["image"], + "properties": { + "image": { "$ref": "#/definitions/linuxGPUMachineImage" }, + "resource_class": { + "$ref": "#/definitions/linuxGPUResourceClass" + } + } + }, + "resource_class": { "$ref": "#/definitions/linuxGPUResourceClass" } + }, + "dependencies": { + "resource_class": { + "not": { + "properties": { + "machine": { + "required": ["resource_class"] + } + } + } + } + } + }, + { + "properties": { + "machine": { + "type": "object", + "additionalProperties": false, + "required": ["image"], + "properties": { + "image": { "$ref": "#/definitions/windowsGPUMachineImage" }, + "resource_class": { + "$ref": "#/definitions/windowsGPUResourceClass" + } + } + }, + "resource_class": { + "$ref": "#/definitions/windowsGPUResourceClass" + } + }, + "dependencies": { + "resource_class": { + "not": { + "properties": { + "machine": { + "required": ["resource_class"] + } + } + } + } + } + }, + { + "properties": { + "machine": { + "type": "object", + "additionalProperties": false, + "required": ["resource_class"], + "properties": { + "resource_class": { + "$ref": "#/definitions/selfHostedRunnerResourceClass" + } + } + } + } + } + ] + }, + "macosExecutor": { + "description": "Options for the [macOS executor](https://circleci.com/docs/configuration-reference#macos)", + "type": "object", + "required": ["macos"], + "properties": { + "macos": { + "type": "object", + "additionalProperties": false, + "required": ["xcode"], + "properties": { + "xcode": { + "$ref": "#/definitions/xcodeVersion" + } + } + }, + "resource_class": { + "$ref": "#/definitions/macOSResourceClass" + } + } + }, + "executorChoice": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/dockerExecutor" + }, + { + "$ref": "#/definitions/machineExecutor" + }, + { + "$ref": "#/definitions/macosExecutor" + } + ] + }, + "executors": { + "description": "Executors define the environment in which the steps of a job will be run, allowing you to reuse a single executor definition across multiple jobs.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/executorChoice", + "type": "object", + "properties": { + "shell": { + "description": "Shell to use for execution command in all steps. Can be overridden by shell in each step (default: See [Default Shell Options](https://circleci.com/docs/configuration-reference#default-shell-options)", + "type": "string" + }, + "working_directory": { + "description": "In which directory to run the steps.", + "type": "string" + }, + "environment": { + "description": "A map of environment variable names and values.", + "type": "object", + "additionalProperties": { + "type": ["string", "number"] + } + } + } + } + }, + "builtinSteps": { + "documentation": { + "run": { + "description": "https://circleci.com/docs/configuration-reference#run\n\nUsed for invoking all command-line programs, taking either a map of configuration values, or, when called in its short-form, a string that will be used as both the `command` and `name`. Run commands are executed using non-login shells by default, so you must explicitly source any dotfiles as part of the command." + }, + "checkout": { + "description": "https://circleci.com/docs/configuration-reference#checkout\n\nSpecial step used to check out source code to the configured `path` (defaults to the `working_directory`). The reason this is a special step is because it is more of a helper function designed to make checking out code easy for you. If you require doing git over HTTPS you should not use this step as it configures git to checkout over ssh." + }, + "setup_remote_docker": { + "description": "https://circleci.com/docs/configuration-reference#setup_remote_docker\n\nCreates a remote Docker environment configured to execute Docker commands." + }, + "save_cache": { + "description": "https://circleci.com/docs/configuration-reference#save_cache\n\nGenerates and stores a cache of a file or directory of files such as dependencies or source code in our object storage. Later jobs can restore this cache using the `restore_cache` step." + }, + "restore_cache": { + "description": "https://circleci.com/docs/configuration-reference#restore_cache\n\nRestores a previously saved cache based on a `key`. Cache needs to have been saved first for this key using the `save_cache` step." + }, + "deploy": { + "description": "https://circleci.com/docs/configuration-reference#deploy\n\nSpecial step for deploying artifacts. `deploy` uses the same configuration map and semantics as run step. Jobs may have more than one deploy step. In general deploy step behaves just like run with two exceptions:\n* In a job with parallelism, the deploy step will only be executed by node #0 and only if all nodes succeed. Nodes other than #0 will skip this step.\n* In a job that runs with SSH, the deploy step will not execute" + }, + "store_artifacts": { + "description": "https://circleci.com/docs/configuration-reference#store_artifacts\n\nStep to store artifacts (for example logs, binaries, etc) to be available in the web app or through the API." + }, + "store_test_results": { + "description": "https://circleci.com/docs/configuration-reference#storetestresults\n\nSpecial step used to upload test results so they display in builds' Test Summary section and can be used for timing analysis. To also see test result as build artifacts, please use the `store_artifacts` step." + }, + "persist_to_workspace": { + "description": "https://circleci.com/docs/configuration-reference#persist_to_workspace\n\nSpecial step used to persist a temporary file to be used by another job in the workflow" + }, + "attach_workspace": { + "description": "https://circleci.com/docs/configuration-reference#attach_workspace\n\nSpecial step used to attach the workflow's workspace to the current container. The full contents of the workspace are downloaded and copied into the directory the workspace is being attached at." + }, + "add_ssh_keys": { + "description": "https://circleci.com/docs/configuration-reference#add_ssh_keys\n\nSpecial step that adds SSH keys from a project's settings to a container. Also configures SSH to use these keys." + }, + "when": { + "description": "https://circleci.com/docs/configuration-reference#the-when-step-requires-version-21 \n\nConditional step to run on custom conditions (determined at config-compile time) that are checked before a workflow runs" + }, + "unless": { + "description": "https://circleci.com/docs/configuration-reference#the-when-step-requires-version-21 \n\nConditional step to run when custom conditions aren't met (determined at config-compile time) that are checked before a workflow runs" + } + }, + "configuration": { + "run": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/run" + } + ], + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": false, + "required": ["command"], + "properties": { + "command": { + "description": "Command to run via the shell", + "type": "string" + }, + "name": { + "description": "Title of the step to be shown in the CircleCI UI (default: full `command`)", + "type": "string" + }, + "shell": { + "description": "Shell to use for execution command", + "type": "string" + }, + "environment": { + "description": "Additional environmental variables, locally scoped to command", + "type": "object", + "additionalProperties": { + "type": ["string", "number"] + } + }, + "background": { + "description": "Whether or not this step should run in the background (default: false)", + "default": false, + "type": "boolean" + }, + "working_directory": { + "description": "In which directory to run this step (default: `working_directory` of the job", + "type": "string" + }, + "no_output_timeout": { + "description": "Elapsed time the command can run without output. The string is a decimal with unit suffix, such as \"20m\", \"1.25h\", \"5s\" (default: 10 minutes)", + "type": "string", + "pattern": "\\d+(\\.\\d+)?[mhs]", + "default": "10m" + }, + "when": { + "description": "Specify when to enable or disable the step. Takes the following values: `always`, `on_success`, `on_fail` (default: `on_success`)", + "enum": ["always", "on_success", "on_fail"] + } + } + } + ] + }, + "checkout": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/checkout" + } + ], + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "Title of the step to be shown in the CircleCI UI", + "type": "string" + }, + "path": { + "description": "Checkout directory (default: job's `working_directory`)", + "type": "string" + } + } + }, + "setup_remote_docker": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/setup_remote_docker" + } + ], + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "Title of the step to be shown in the CircleCI UI", + "type": "string" + }, + "docker_layer_caching": { + "description": "When `docker_layer_caching` is set to `true`, CircleCI will try to reuse Docker Images (layers) built during a previous job or workflow (Paid feature)", + "type": "boolean", + "default": false + }, + "version": { + "description": "If your build requires a specific docker image, you can set it as an image attribute", + "anyOf": [ + { + "type": "string", + "enum": [ + "20.10.24", + "20.10.23", + "20.10.18", + "20.10.17", + "20.10.14", + "20.10.12", + "20.10.11", + "20.10.7", + "20.10.6", + "20.10.2", + "19.03.13" + ] + }, + { + "type": "string" + } + ] + } + } + }, + "save_cache": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/save_cache" + } + ], + "type": "object", + "additionalProperties": false, + "required": ["paths", "key"], + "properties": { + "paths": { + "description": "List of directories which should be added to the cache", + "type": "array", + "items": { + "type": "string" + } + }, + "key": { + "description": "Unique identifier for this cache", + "type": "string" + }, + "name": { + "type": "string", + "description": "Title of the step to be shown in the CircleCI UI (default: 'Saving Cache')" + }, + "when": { + "description": "Specify when to enable or disable the step. Takes the following values: `always`, `on_success`, `on_fail` (default: `on_success`)", + "enum": ["always", "on_success", "on_fail"] + } + } + }, + "restore_cache": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/restore_cache" + } + ], + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "required": ["key"], + "properties": { + "key": { + "type": "string", + "description": "Single cache key to restore" + }, + "name": { + "type": "string", + "description": "Title of the step to be shown in the CircleCI UI (default: 'Restoring Cache')" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": ["keys"], + "properties": { + "name": { + "type": "string", + "description": "Title of the step to be shown in the CircleCI UI (default: 'Restoring Cache')" + }, + "keys": { + "description": "List of cache keys to lookup for a cache to restore. Only first existing key will be restored.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "deploy": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/deploy" + }, + { + "$ref": "#/definitions/builtinSteps/configuration/run" + } + ] + }, + "store_artifacts": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/store_artifacts" + } + ], + "type": "object", + "additionalProperties": false, + "required": ["path"], + "properties": { + "name": { + "description": "Title of the step to be shown in the CircleCI UI", + "type": "string" + }, + "path": { + "description": "Directory in the primary container to save as job artifacts", + "type": "string" + }, + "destination": { + "description": "Prefix added to the artifact paths in the artifacts API (default: the directory of the file specified in `path`)", + "type": "string" + } + } + }, + "store_test_results": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/store_test_results" + } + ], + "type": "object", + "additionalProperties": false, + "required": ["path"], + "properties": { + "name": { + "description": "Title of the step to be shown in the CircleCI UI", + "type": "string" + }, + "path": { + "description": "Path (absolute, or relative to your `working_directory`) to directory containing subdirectories of JUnit XML or Cucumber JSON test metadata files", + "type": "string" + } + } + }, + "persist_to_workspace": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/persist_to_workspace" + } + ], + "type": "object", + "additionalProperties": false, + "required": ["root", "paths"], + "properties": { + "name": { + "description": "Title of the step to be shown in the CircleCI UI", + "type": "string" + }, + "root": { + "description": "Either an absolute path or a path relative to `working_directory`", + "type": "string" + }, + "paths": { + "description": "Glob identifying file(s), or a non-glob path to a directory to add to the shared workspace. Interpreted as relative to the workspace root. Must not be the workspace root itself.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "attach_workspace": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/attach_workspace" + } + ], + "type": "object", + "additionalProperties": false, + "required": ["at"], + "properties": { + "name": { + "description": "Title of the step to be shown in the CircleCI UI", + "type": "string" + }, + "at": { + "description": "Directory to attach the workspace to", + "type": "string" + } + } + }, + "add_ssh_keys": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/add_ssh_keys" + } + ], + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "Title of the step to be shown in the CircleCI UI", + "type": "string" + }, + "fingerprints": { + "description": "Directory to attach the workspace to", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "when": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/when" + } + ], + "type": "object", + "additionalProperties": false, + "properties": { + "condition": { + "$ref": "#/definitions/logical" + }, + "steps": { + "description": "A list of steps to be performed", + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + } + }, + "required": ["condition", "steps"] + }, + "unless": { + "allOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/unless" + } + ], + "type": "object", + "additionalProperties": false, + "properties": { + "condition": { + "$ref": "#/definitions/logical" + }, + "steps": { + "description": "A list of steps to be performed", + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + } + }, + "required": ["condition", "steps"] + } + } + }, + "step": { + "anyOf": [ + { + "$ref": "#/definitions/builtinSteps/documentation/checkout", + "enum": ["checkout"] + }, + { + "$ref": "#/definitions/builtinSteps/documentation/setup_remote_docker", + "enum": ["setup_remote_docker"] + }, + { + "$ref": "#/definitions/builtinSteps/documentation/add_ssh_keys", + "enum": ["add_ssh_keys"] + }, + { + "description": "https://circleci.com/docs/reusing-config#invoking-reusable-commands\n\nA custom command defined via the top level commands key", + "type": "string", + "pattern": "^[a-z][a-z0-9_-]+$" + }, + { + "description": "https://circleci.com/docs/using-orbs#commands\n\nA custom command defined via an orb.", + "type": "string", + "pattern": "^[a-z][a-z0-9_-]+/[a-z][a-z0-9_-]+$" + }, + { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "properties": { + "run": { + "$ref": "#/definitions/builtinSteps/configuration/run" + }, + "checkout": { + "$ref": "#/definitions/builtinSteps/configuration/checkout" + }, + "setup_remote_docker": { + "$ref": "#/definitions/builtinSteps/configuration/setup_remote_docker" + }, + "save_cache": { + "$ref": "#/definitions/builtinSteps/configuration/save_cache" + }, + "restore_cache": { + "$ref": "#/definitions/builtinSteps/configuration/restore_cache" + }, + "deploy": { + "$ref": "#/definitions/builtinSteps/configuration/deploy" + }, + "store_artifacts": { + "$ref": "#/definitions/builtinSteps/configuration/store_artifacts" + }, + "store_test_results": { + "$ref": "#/definitions/builtinSteps/configuration/store_test_results" + }, + "persist_to_workspace": { + "$ref": "#/definitions/builtinSteps/configuration/persist_to_workspace" + }, + "attach_workspace": { + "$ref": "#/definitions/builtinSteps/configuration/attach_workspace" + }, + "add_ssh_keys": { + "$ref": "#/definitions/builtinSteps/configuration/add_ssh_keys" + }, + "when": { + "$ref": "#/definitions/builtinSteps/configuration/when" + }, + "unless": { + "$ref": "#/definitions/builtinSteps/configuration/unless" + } + }, + "patternProperties": { + "^[a-z][a-z0-9_-]+$": { + "description": "https://circleci.com/docs/reusing-config#invoking-reusable-commands\n\nA custom command defined via the top level commands key" + }, + "^[a-z][a-z0-9_-]+/[a-z][a-z0-9_-]+$": { + "description": "https://circleci.com/docs/using-orbs#commands\n\nA custom command defined via an orb." + } + } + } + ] + }, + "jobRef": { + "description": "Run a job as part of this workflow", + "type": "object", + "additionalProperties": true, + "properties": { + "requires": { + "description": "Jobs are run in parallel by default, so you must explicitly require any dependencies by their job name.", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "The name key can be used to ensure build numbers are not appended when invoking the same job multiple times (e.g., sayhello-1, sayhello-2). The name assigned needs to be unique, otherwise numbers will still be appended to the job name", + "type": "string" + }, + "context": { + "description": "Either a single context name, or a list of contexts. The default name is `org-global`", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "default": "org-global" + }, + "type": { + "description": "A job may have a `type` of `approval` indicating it must be manually approved before downstream jobs may proceed.", + "enum": ["approval"] + }, + "filters": { + "description": "A map defining rules for execution on specific branches", + "type": "object", + "additionalProperties": false, + "properties": { + "branches": { + "$ref": "#/definitions/filter" + }, + "tags": { + "$ref": "#/definitions/filter" + } + } + }, + "matrix": { + "description": "https://circleci.com/docs/configuration-reference#matrix-requires-version-21\n\nThe matrix stanza allows you to run a parameterized job multiple times with different arguments.", + "type": "object", + "additionalProperties": false, + "required": ["parameters"], + "properties": { + "parameters": { + "description": "A map of parameter names to every value the job should be called with", + "type": "object", + "additionalProperties": { + "type": "array" + } + }, + "exclude": { + "description": "A list of argument maps that should be excluded from the matrix", + "type": "array", + "items": { + "type": "object" + } + }, + "alias": { + "description": "An alias for the matrix, usable from another job's requires stanza. Defaults to the name of the job being executed", + "type": "string" + } + } + } + } + }, + "jobs": { + "description": "Jobs are collections of steps. All of the steps in the job are executed in a single unit, either within a fresh container or VM.", + "type": "object", + "additionalProperties": { + "type": "object", + "anyOf": [ + { + "$ref": "#/definitions/executorChoice" + }, + { + "type": "object", + "required": ["executor"], + "properties": { + "executor": { + "description": "The name of the executor to use (defined via the top level executors map).", + "type": "string" + } + } + }, + { + "type": "object", + "required": ["executor"], + "properties": { + "executor": { + "description": "Executor stanza to use for the job", + "type": "object", + "required": ["name"], + "properties": { + "name": { + "description": "The name of the executor to use (defined via the top level executors map).", + "type": "string" + } + } + } + } + } + ], + "required": ["steps"], + "properties": { + "shell": { + "description": "Shell to use for execution command in all steps. Can be overridden by shell in each step", + "type": "string" + }, + "steps": { + "description": "A list of steps to be performed", + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + }, + "working_directory": { + "description": "In which directory to run the steps. (default: `~/project`. `project` is a literal string, not the name of the project.) You can also refer the directory with `$CIRCLE_WORKING_DIRECTORY` environment variable.", + "type": "string", + "default": "~/project" + }, + "parallelism": { + "description": "Number of parallel instances of this job to run (default: 1)", + "default": 1, + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string", + "pattern": "^<<.+\\..+>>$" + } + ] + }, + "environment": { + "description": "A map of environment variable names and variables (NOTE: these will override any environment variables you set in the CircleCI web interface).", + "type": "object", + "additionalProperties": { + "type": ["string", "number"] + } + }, + "branches": { + "description": "A map defining rules for whitelisting/blacklisting execution of specific branches for a single job that is **not** in a workflow (default: all whitelisted). See Workflows for configuring branch execution for jobs in a workflow.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "linuxResourceClass": { + "description": "Amount of CPU and RAM allocated for each job. View available resource classes for [x86](https://circleci.com/docs/configuration-reference/#docker-execution-environment) or [ARM](https://circleci.com/docs/configuration-reference/#arm-execution-environment-linux).", + "type": "string", + "enum": [ + "small", + "medium", + "medium+", + "large", + "xlarge", + "2xlarge", + "2xlarge+", + "arm.medium", + "arm.large", + "arm.xlarge", + "arm.2xlarge" + ] + }, + "linuxMachineImage": { + "description": "The LinuxVM image to use. View available images for [Ubuntu 20.04](https://circleci.com/developer/machine/image/ubuntu-2004), [Ubuntu 22.04](https://circleci.com/developer/machine/image/ubuntu-2204), or [Android](https://circleci.com/developer/machine/image/android). **Note:** This key is **not** supported on the installable CircleCI. For information about customizing machine executor images on CircleCI installed on your servers, see our [VM Service documentation](https://circleci.com/docs/vm-service).", + "type": "string", + "enum": [ + "ubuntu-2004:2024.04.4", + "ubuntu-2004:2024.01.2", + "ubuntu-2004:2024.01.1", + "ubuntu-2004:2023.10.1", + "ubuntu-2004:2023.07.1", + "ubuntu-2004:2023.04.2", + "ubuntu-2004:2023.04.1", + "ubuntu-2004:2023.02.1", + "ubuntu-2004:2022.10.1", + "ubuntu-2004:2022.07.1", + "ubuntu-2004:2022.04.2", + "ubuntu-2004:2022.04.1", + "ubuntu-2004:202201-02", + "ubuntu-2004:202201-01", + "ubuntu-2004:202111-02", + "ubuntu-2004:202111-01", + "ubuntu-2004:202107-02", + "ubuntu-2004:202104-01", + "ubuntu-2004:202101-01", + "ubuntu-2004:202010-01", + "ubuntu-2004:current", + "ubuntu-2004:edge", + "ubuntu-2204:2024.04.4", + "ubuntu-2204:2024.01.2", + "ubuntu-2204:2024.01.1", + "ubuntu-2204:2023.10.1", + "ubuntu-2204:2023.07.2", + "ubuntu-2204:2023.04.2", + "ubuntu-2204:2023.04.1", + "ubuntu-2204:2023.02.1", + "ubuntu-2204:2022.10.2", + "ubuntu-2204:2022.10.1", + "ubuntu-2204:2022.07.2", + "ubuntu-2204:2022.07.1", + "ubuntu-2204:2022.04.2", + "ubuntu-2204:2022.04.1", + "ubuntu-2204:current", + "ubuntu-2204:edge", + "android:2024.04.1", + "android:2024.01.1", + "android:2023.11.1", + "android:2023.10.1", + "android:2023.09.1", + "android:2023.08.1", + "android:2023.07.1", + "android:2023.06.1", + "android:2023.05.1", + "android:2023.04.1", + "android:2023.03.1", + "android:2023.02.1", + "android:2022.12.1", + "android:2022.09.1", + "android:2022.08.1", + "android:2022.07.1", + "android:2022.06.2", + "android:2022.06.1", + "android:2022.04.1", + "android:2022.03.1", + "android:2022.01.1", + "android:2021.12.1", + "android:2021.10.1", + "android:202102-01" + ] + }, + "windowsResourceClass": { + "description": "Amount of CPU and RAM allocated for each job. View [available resource classes](https://circleci.com/docs/configuration-reference/#windows-execution-environment).", + "type": "string", + "enum": [ + "windows.medium", + "windows.large", + "windows.xlarge", + "windows.2xlarge" + ] + }, + "windowsMachineImage": { + "description": "The Windows machine image to use. View available images for [Windows Server 2022](https://circleci.com/developer/machine/image/windows-server-2022-gui) or [Windows Server 2019](https://circleci.com/developer/machine/image/windows-server-2019).", + "type": "string", + "enum": [ + "windows-server-2019-vs2019:2024.05.1", + "windows-server-2019-vs2019:2024.01.1", + "windows-server-2019-vs2019:2023.10.1", + "windows-server-2019-vs2019:2023.08.1", + "windows-server-2019-vs2019:2023.04.1", + "windows-server-2019-vs2019:2022.08.1", + "windows-server-2019-vs2019:current", + "windows-server-2019-vs2019:edge", + "windows-server-2022-gui:2024.04.1", + "windows-server-2022-gui:2024.01.1", + "windows-server-2022-gui:2023.11.1", + "windows-server-2022-gui:2023.10.1", + "windows-server-2022-gui:2023.09.1", + "windows-server-2022-gui:2023.08.1", + "windows-server-2022-gui:2023.07.1", + "windows-server-2022-gui:2023.06.1", + "windows-server-2022-gui:2023.05.1", + "windows-server-2022-gui:2023.04.1", + "windows-server-2022-gui:2023.03.1", + "windows-server-2022-gui:2022.08.1", + "windows-server-2022-gui:2022.07.1", + "windows-server-2022-gui:2022.06.1", + "windows-server-2022-gui:2022.04.1", + "windows-server-2022-gui:current", + "windows-server-2022-gui:edge" + ] + }, + "linuxGPUResourceClass": { + "description": "Amount of CPU and RAM allocated for each job. View [available resource classes](https://circleci.com/docs/configuration-reference/#gpu-execution-environment-linux).", + "type": "string", + "enum": [ + "gpu.nvidia.small.gen2", + "gpu.nvidia.small.multi", + "gpu.nvidia.medium.multi", + "gpu.nvidia.medium", + "gpu.nvidia.large" + ] + }, + "linuxGPUMachineImage": { + "description": "The Linux GPU machine image to use. View available images for [CUDA 11](https://circleci.com/developer/machine/image/linux-cuda-11) or [CUDA 12](https://circleci.com/developer/machine/image/linux-cuda-12).", + "type": "string", + "enum": [ + "linux-cuda-11:default", + "linux-cuda-11:edge", + "linux-cuda-12:default", + "linux-cuda-12:edge" + ] + }, + "windowsGPUResourceClass": { + "description": "Amount of CPU and RAM allocated for each job. View [available resource classes](https://circleci.com/docs/configuration-reference/#gpu-execution-environment-windows).", + "type": "string", + "enum": ["windows.gpu.nvidia.medium"] + }, + "windowsGPUMachineImage": { + "description": "The Windows GPU machine image to use. View [available images](https://circleci.com/developer/machine/image/windows-server-2019-cuda).", + "type": "string", + "enum": [ + "windows-server-2019-cuda:current", + "windows-server-2019-cuda:edge" + ] + }, + "macOSResourceClass": { + "description": "Amount of CPU and RAM allocated for each job. View [available resource classes](https://circleci.com/docs/configuration-reference/#macos-execution-environment).", + "type": "string", + "enum": [ + "macos.x86.medium.gen2", + "macos.m1.medium.gen1", + "macos.m1.large.gen1" + ] + }, + "xcodeVersion": { + "description": "The version of Xcode to use. View [available versions](https://circleci.com/developer/machine/image/xcode)", + "type": "string", + "enum": [ + "15.4.0", + "15.3.0", + "15.2.0", + "15.1.0", + "15.0.0", + "14.3.1", + "14.2.0", + "14.1.0", + "14.0.1", + "13.4.1", + "12.5.1" + ] + }, + "selfHostedRunnerResourceClass": { + "type": "string", + "pattern": "^[^/\\s]+/\\S+$" + } + }, + "properties": { + "version": { + "description": "The version field is intended to be used in order to issue warnings for deprecation or breaking changes.", + "default": 2.1, + "enum": [2, 2.1] + }, + "orbs": { + "$ref": "#/definitions/orbs" + }, + "commands": { + "$ref": "#/definitions/commands" + }, + "executors": { + "$ref": "#/definitions/executors" + }, + "jobs": { + "$ref": "#/definitions/jobs", + "propertyNames": { + "pattern": "^[A-Za-z][A-Za-z\\s\\d_-]*$" + } + }, + "workflows": { + "description": "Used for orchestrating all jobs. Each workflow consists of the workflow name as a key and a map as a value", + "type": "object", + "properties": { + "version": { + "description": "The Workflows `version` field is used to issue warnings for deprecation or breaking changes during v2 Beta. It is deprecated as of CircleCI v2.1", + "enum": [2] + } + }, + "additionalProperties": { + "type": "object", + "additionalProperties": false, + "properties": { + "triggers": { + "description": "Specifies which triggers will cause this workflow to be executed. Default behavior is to trigger the workflow when pushing to a branch.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "schedule": { + "description": "A workflow may have a schedule indicating it runs at a certain time, for example a nightly build that runs every day at 12am UTC:", + "type": "object", + "properties": { + "cron": { + "description": "See the [crontab man page](http://pubs.opengroup.org/onlinepubs/7908799/xcu/crontab.html)", + "type": "string" + }, + "filters": { + "description": "A map defining rules for execution on specific branches", + "type": "object", + "additionalProperties": false, + "properties": { + "branches": { + "$ref": "#/definitions/filter" + } + } + } + } + } + } + } + }, + "jobs": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/jobRef", + "type": "object" + } + } + ] + } + }, + "when": { + "$ref": "#/definitions/logical", + "description": "Specify when to run the workflow." + }, + "unless": { + "$ref": "#/definitions/logical", + "description": "Specify when *not* to run the workflow." + } + } + } + } + }, + "required": ["version"], + "title": "JSON schema for CircleCI configuration files", + "type": "object" +} diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/circle-ci.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/circle-ci.sha256 new file mode 100644 index 000000000..eb9898d40 --- /dev/null +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/circle-ci.sha256 @@ -0,0 +1 @@ +ee053865b24ae25f461058a1272d578a6022926fa75e8fd95894c09ec3ebdb5d \ No newline at end of file diff --git a/src/check_jsonschema/catalog.py b/src/check_jsonschema/catalog.py index cdaf9159d..12e631ebf 100644 --- a/src/check_jsonschema/catalog.py +++ b/src/check_jsonschema/catalog.py @@ -70,6 +70,18 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str: "types_or": ["json", "yaml"], }, }, + "circle-ci": { + "url": "https://json.schemastore.org/circleciconfig.json", + "hook_config": { + "name": "Validate Circle CI config", + "description": ( + "Validate Circle CI config against the schema provided " + "by SchemaStore" + ), + "files": r"^\.circleci/config\.(yml|yaml)$", + "type": "yaml", + }, + }, "cloudbuild": { "url": "https://json.schemastore.org/cloudbuild.json", "hook_config": { From 5c622769fe1c67e3bb9cb31276f58ec1e6711888 Mon Sep 17 00:00:00 2001 From: Jordan Bradford <36420801+jrdnbradford@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:41:39 -0400 Subject: [PATCH 11/15] Update CircleCI name --- .pre-commit-hooks.yaml | 4 ++-- docs/precommit_usage.rst | 2 +- src/check_jsonschema/catalog.py | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 510426c5a..f3c96cd36 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -72,8 +72,8 @@ # to modify this hook, update `src/check_jsonschema/catalog.py` # and run `make generate-hooks` or `tox run -e generate-hooks-config` - id: check-circle-ci - name: Validate Circle CI config - description: 'Validate Circle CI config against the schema provided by SchemaStore' + name: Validate CircleCI config + description: 'Validate CircleCI config against the schema provided by SchemaStore' entry: check-jsonschema --builtin-schema vendor.circle-ci language: python files: ^\.circleci/config\.(yml|yaml)$ diff --git a/docs/precommit_usage.rst b/docs/precommit_usage.rst index 93dc17b64..abd4f978d 100644 --- a/docs/precommit_usage.rst +++ b/docs/precommit_usage.rst @@ -102,7 +102,7 @@ Validate Buildkite Pipelines against the schema provided by Buildkite ``check-circle-ci`` ~~~~~~~~~~~~~~~~~~~ -Validate Circle CI config against the schema provided by SchemaStore +Validate CircleCI config against the schema provided by SchemaStore .. code-block:: yaml :caption: example config diff --git a/src/check_jsonschema/catalog.py b/src/check_jsonschema/catalog.py index 12e631ebf..6724284f6 100644 --- a/src/check_jsonschema/catalog.py +++ b/src/check_jsonschema/catalog.py @@ -73,10 +73,9 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str: "circle-ci": { "url": "https://json.schemastore.org/circleciconfig.json", "hook_config": { - "name": "Validate Circle CI config", + "name": "Validate CircleCI config", "description": ( - "Validate Circle CI config against the schema provided " - "by SchemaStore" + "Validate CircleCI config against the schema provided by SchemaStore" ), "files": r"^\.circleci/config\.(yml|yaml)$", "type": "yaml", From b4c0da7aaf0a84357a6cb81f0675f2a8abfafd1c Mon Sep 17 00:00:00 2001 From: sirosen <1300022+sirosen@users.noreply.github.com> Date: Sun, 16 Jun 2024 04:22:58 +0000 Subject: [PATCH 12/15] [vendor-schemas] automated update --- CHANGELOG.rst | 2 ++ src/check_jsonschema/builtin_schemas/vendor/readthedocs.json | 4 ++++ src/check_jsonschema/builtin_schemas/vendor/renovate.json | 3 ++- .../builtin_schemas/vendor/sha256/readthedocs.sha256 | 2 +- .../builtin_schemas/vendor/sha256/renovate.sha256 | 2 +- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d494f5e6e..60e413a4e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,8 @@ Unreleased .. vendor-insert-here +- Update vendored schemas (2024-06-16) + 0.28.5 ------ diff --git a/src/check_jsonschema/builtin_schemas/vendor/readthedocs.json b/src/check_jsonschema/builtin_schemas/vendor/readthedocs.json index 63a4bc13b..81b598a74 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/readthedocs.json +++ b/src/check_jsonschema/builtin_schemas/vendor/readthedocs.json @@ -153,9 +153,11 @@ "3.12", "latest", "miniconda3-4.7", + "miniconda3-3.12-24.1", "miniconda-latest", "mambaforge-4.10", "mambaforge-22.9", + "mambaforge-23.11", "mambaforge-latest" ] }, @@ -182,6 +184,7 @@ "1.64", "1.70", "1.75", + "1.78", "latest" ] }, @@ -192,6 +195,7 @@ "1.19", "1.20", "1.21", + "1.22", "latest" ] } diff --git a/src/check_jsonschema/builtin_schemas/vendor/renovate.json b/src/check_jsonschema/builtin_schemas/vendor/renovate.json index ca0c96535..6e10fa246 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/renovate.json +++ b/src/check_jsonschema/builtin_schemas/vendor/renovate.json @@ -965,7 +965,7 @@ "dockerSidecarImage": { "description": "Change this value to override the default Renovate sidecar image.", "type": "string", - "default": "ghcr.io/containerbase/sidecar:10.11.1" + "default": "ghcr.io/containerbase/sidecar:10.11.6" }, "dockerUser": { "description": "Set the `UID` and `GID` for Docker-based binaries if you use `binarySource=docker`.", @@ -3557,6 +3557,7 @@ "debian", "docker", "git", + "glasskube", "go-mod-directive", "gradle", "hashicorp", diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/readthedocs.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/readthedocs.sha256 index a35f90b20..00830e7a0 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/readthedocs.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/readthedocs.sha256 @@ -1 +1 @@ -ef1d80216d9d0e6a8927513418e14efd90dc5a65e90828124b517785afa70bc8 \ No newline at end of file +8696f08cc4b6d81fcf91168ee1c3c483b8a471ed36f5cdbf34e202ab0e8b683b \ No newline at end of file diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 index 18d143543..84ca92542 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 @@ -1 +1 @@ -98bc78083c3cc4d03f820b6e615bd91d892102ba62b08d129da7e419b7c76556 \ No newline at end of file +8dd71c2ef78037a9573ba44c6e028e31de368f93f4cd702a2ac1ec722cc69b11 \ No newline at end of file From b6f745162729a9cde19a6b0b910a418b6e06ce9d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:34:01 +0000 Subject: [PATCH 13/15] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/python-jsonschema/check-jsonschema: 0.28.4 → 0.28.5](https://github.com/python-jsonschema/check-jsonschema/compare/0.28.4...0.28.5) - [github.com/PyCQA/flake8: 7.0.0 → 7.1.0](https://github.com/PyCQA/flake8/compare/7.0.0...7.1.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4bd0b31bb..126cb7b3e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # dogfood - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.5 hooks: - id: check-dependabot - id: check-github-workflows @@ -23,7 +23,7 @@ repos: hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 + rev: 7.1.0 hooks: - id: flake8 additional_dependencies: From f34595d95fd6ecc13f52725d7be02e007bf89a3a Mon Sep 17 00:00:00 2001 From: sirosen <1300022+sirosen@users.noreply.github.com> Date: Sun, 23 Jun 2024 04:22:45 +0000 Subject: [PATCH 14/15] [vendor-schemas] automated update --- CHANGELOG.rst | 2 +- .../vendor/bitbucket-pipelines.json | 31 ++++++++++++++++++- .../builtin_schemas/vendor/readthedocs.json | 1 + .../builtin_schemas/vendor/renovate.json | 2 +- .../vendor/sha256/bitbucket-pipelines.sha256 | 2 +- .../vendor/sha256/readthedocs.sha256 | 2 +- .../vendor/sha256/renovate.sha256 | 2 +- 7 files changed, 36 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 60e413a4e..48e1c9d92 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,7 +10,7 @@ Unreleased .. vendor-insert-here -- Update vendored schemas (2024-06-16) +- Update vendored schemas (2024-06-23) 0.28.5 ------ diff --git a/src/check_jsonschema/builtin_schemas/vendor/bitbucket-pipelines.json b/src/check_jsonschema/builtin_schemas/vendor/bitbucket-pipelines.json index 6d4676a68..7a57c0a1e 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/bitbucket-pipelines.json +++ b/src/check_jsonschema/builtin_schemas/vendor/bitbucket-pipelines.json @@ -151,6 +151,18 @@ "title": "Clone Repository Settings", "type": "object" }, + "cloud": { + "description": "Custom cloud step runtime", + "properties": { + "atlassian-ip-ranges": { + "default": false, + "description": "Whether it uses Atlassian ip ranges.", + "type": "boolean" + } + }, + "title": "Cloud step runtime", + "type": "object" + }, "condition": { "properties": { "changesets": { @@ -557,6 +569,9 @@ "max-time": { "$ref": "#/components/schemas/max_time" }, + "runtime": { + "$ref": "#/components/schemas/runtime" + }, "size": { "$ref": "#/components/schemas/size" } @@ -640,6 +655,16 @@ "title": "Step Runner Label", "type": "string" }, + "runtime": { + "description": "Custom step runtime", + "properties": { + "cloud": { + "$ref": "#/components/schemas/cloud" + } + }, + "title": "Step Runtime", + "type": "object" + }, "script": { "items": { "oneOf": [ @@ -700,7 +725,8 @@ "2x", "4x", "8x", - "16x" + "16x", + "32x" ], "title": "Step Size", "type": "string" @@ -838,6 +864,9 @@ "runs-on": { "$ref": "#/components/schemas/runs_on" }, + "runtime": { + "$ref": "#/components/schemas/runtime" + }, "script": { "$ref": "#/components/schemas/script", "description": "List of commands that are executed in sequence.", diff --git a/src/check_jsonschema/builtin_schemas/vendor/readthedocs.json b/src/check_jsonschema/builtin_schemas/vendor/readthedocs.json index 81b598a74..a5f28d539 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/readthedocs.json +++ b/src/check_jsonschema/builtin_schemas/vendor/readthedocs.json @@ -61,6 +61,7 @@ "enum": [ "ubuntu-20.04", "ubuntu-22.04", + "ubuntu-24.04", "ubuntu-lts-latest" ] }, diff --git a/src/check_jsonschema/builtin_schemas/vendor/renovate.json b/src/check_jsonschema/builtin_schemas/vendor/renovate.json index 6e10fa246..5ae791f38 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/renovate.json +++ b/src/check_jsonschema/builtin_schemas/vendor/renovate.json @@ -965,7 +965,7 @@ "dockerSidecarImage": { "description": "Change this value to override the default Renovate sidecar image.", "type": "string", - "default": "ghcr.io/containerbase/sidecar:10.11.6" + "default": "ghcr.io/containerbase/sidecar:10.11.7" }, "dockerUser": { "description": "Set the `UID` and `GID` for Docker-based binaries if you use `binarySource=docker`.", diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/bitbucket-pipelines.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/bitbucket-pipelines.sha256 index 76e65e351..21432d211 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/bitbucket-pipelines.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/bitbucket-pipelines.sha256 @@ -1 +1 @@ -60586ed3669f79395b4689de2e99d44876d4c83670e144b28f980d3aa414d795 \ No newline at end of file +3dd04c344f6d3f3211c9ad7fd775b2c3ccd309c75c2d00f379b0339abfb57e5e \ No newline at end of file diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/readthedocs.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/readthedocs.sha256 index 00830e7a0..b654eb8b8 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/readthedocs.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/readthedocs.sha256 @@ -1 +1 @@ -8696f08cc4b6d81fcf91168ee1c3c483b8a471ed36f5cdbf34e202ab0e8b683b \ No newline at end of file +c64013c6d817252e76a357a1c00fc645c7c8760811991dd74c325aff8b5c0464 \ No newline at end of file diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 index 84ca92542..dec5d4a6c 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/renovate.sha256 @@ -1 +1 @@ -8dd71c2ef78037a9573ba44c6e028e31de368f93f4cd702a2ac1ec722cc69b11 \ No newline at end of file +ddfe7dda772797830c75a5df98aa1129a17c36c9661251120420b91e7de3e906 \ No newline at end of file From 6c9dab8f0fa0c0271d930e1e5c15935e00b4df66 Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Mon, 24 Jun 2024 10:46:58 -0500 Subject: [PATCH 15/15] Bump version for release --- CHANGELOG.rst | 4 ++++ README.md | 2 +- docs/optional_parsers.rst | 4 ++-- docs/precommit_usage.rst | 40 +++++++++++++++++++-------------------- setup.cfg | 2 +- 5 files changed, 28 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 48e1c9d92..1cbeeb0f4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,7 +10,11 @@ Unreleased .. vendor-insert-here +0.28.6 +------ + - Update vendored schemas (2024-06-23) +- Add CircleCI schema and pre-commit hook. Thanks :user:`jrdnbradford`! (:pr:`444`) 0.28.5 ------ diff --git a/README.md b/README.md index 8d36a65e7..681355952 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ files. ```yaml - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-github-workflows args: ["--verbose"] diff --git a/docs/optional_parsers.rst b/docs/optional_parsers.rst index 28ba310f6..407395a69 100644 --- a/docs/optional_parsers.rst +++ b/docs/optional_parsers.rst @@ -20,7 +20,7 @@ For example, .. code-block:: yaml - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-renovate additional_dependencies: ['pyjson5'] @@ -45,7 +45,7 @@ For example, .. code-block:: yaml - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-jsonschema name: 'Check GitHub Workflows' diff --git a/docs/precommit_usage.rst b/docs/precommit_usage.rst index abd4f978d..e3faafcb5 100644 --- a/docs/precommit_usage.rst +++ b/docs/precommit_usage.rst @@ -17,7 +17,7 @@ You must specify a schema using pre-commit ``args`` configuration. :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-jsonschema files: ^data/.*\.json$ @@ -34,7 +34,7 @@ Validate JSON Schema files against their matching metaschema, as specified in th :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-metaschema files: ^schemas/.*\.json$ @@ -52,7 +52,7 @@ Validate Azure Pipelines config against the schema provided by Microsoft :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-azure-pipelines @@ -66,7 +66,7 @@ Validate Bamboo Specs against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-bamboo-spec @@ -80,7 +80,7 @@ Validate Bitbucket Pipelines against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-bitbucket-pipelines @@ -94,7 +94,7 @@ Validate Buildkite Pipelines against the schema provided by Buildkite :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-buildkite @@ -108,7 +108,7 @@ Validate CircleCI config against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-circle-ci @@ -122,7 +122,7 @@ Validate Google Cloud Build config against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-cloudbuild @@ -136,7 +136,7 @@ Validate Dependabot Config (v2) against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-dependabot @@ -150,7 +150,7 @@ Validate Drone-CI Config against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-drone-ci @@ -164,7 +164,7 @@ Validate GitHub Actions against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-github-actions @@ -178,7 +178,7 @@ Validate GitHub Workflows against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-github-workflows @@ -192,7 +192,7 @@ Validate GitLab CI config against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-gitlab-ci @@ -206,7 +206,7 @@ Validate ReadTheDocs config against the schema provided by ReadTheDocs :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-readthedocs @@ -220,7 +220,7 @@ Validate Renovate config against the schema provided by Renovate (does not suppo :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-renovate @@ -234,7 +234,7 @@ Validate Taskfile config against the schema provided by Task :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-taskfile @@ -248,7 +248,7 @@ Validate Travis Config against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-travis @@ -262,7 +262,7 @@ Validate Woodpecker Config against the schema provided by SchemaStore :caption: example config - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-woodpecker-ci @@ -288,7 +288,7 @@ manually, you could do this: .. code-block:: yaml - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-jsonschema name: "Check GitHub Workflows" @@ -307,7 +307,7 @@ To check with the builtin schema that a GitHub workflow sets .. code-block:: yaml - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-jsonschema name: "Check GitHub Workflows set timeout-minutes" diff --git a/setup.cfg b/setup.cfg index beba77e43..2d16d8e80 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = check-jsonschema -version = 0.28.5 +version = 0.28.6 description = A jsonschema CLI and pre-commit hook long_description = file: README.md long_description_content_type = text/markdown