The schema at https://api.bitbucket.org/schemas/pipelines-configuration is happy with the following:
definitions:
caches:
node_modules: node_modules
However the online validator and bitbucket itself are not:
For now I've patched the schema (see below) but it would be nice if the main schema stayed in sync with bitbucket.
586,587c586,593
< "additionalProperties": {
< "$ref": "#/components/schemas/cache"
---
> "patternProperties": {
> "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$": {
> "$ref": "#/components/schemas/cache"
> }
> },
> "additionalProperties": false,
> "errorMessage": {
> "additionalProperties": "Invalid cache name '{{params.additionalProperty}}'. Cache names must contain only lowercase alphanumeric characters and hyphens, and cannot start or end with a hyphen."
Here is another one the schema won't catch:
"The 'caches' section in your bitbucket-pipelines.yml file contains a reference to a cache which does not exist in the caches definitions section."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.