diff --git a/docs/usage/modules/versioning.md b/docs/usage/modules/versioning.md index fb69749e3e4b162a4c91f1219bd3c4e606116345..e5fcd8ef992cc8660e1bd64857e502560c9393e8 100644 --- a/docs/usage/modules/versioning.md +++ b/docs/usage/modules/versioning.md @@ -4,11 +4,27 @@ Once Managers have extracted dependencies, and Datasources have located availabl The "versioning" is different for each package manager, because different package managers use different versioning schemes. For example, `npm` uses`1.0.0-beta.1` and `pip` uses `1.0.0b1`. -## Configuring Versioning +## Why you might need to manually configure versioning + +Renovate interprets versions correctly out-of-the-box most of the time. +It's impossible to automatically detect **all** versioning schemes, so sometimes you need to tell the bot what versioning scheme it should use. You can manually configure/override the `versioning` value for a particular dependency. You generally won't need to override the defaults for ecosystems which enforce a strict version scheme like `npm`. -Configuring or overriding the default `versioning` can be helpful for ecosystems like Docker, where versioning is barely a "convention". e.g. + +Configuring or overriding the default `versionScheme` can be particularly helpful for ecosystems like Docker/Kubernetes/Helm, where versioning is barely a "convention". + +## General concepts behind overriding versioning + +- Although you can reconfigure versioning per-manager or per-datasource, it's unlikely that such a broad change would ever be needed +- More commonly you would need to configure `versionScheme` for individual packages or potentially package patterns +- The best way to do this is with `packageRules`, with a combination of `matchManagers`, `matchDatasources`, `matchPackageNames` and `matchPackagePatterns` + +## Examples of versioning overrides + +### Overriding Docker versioning to use a versioning specific for a package + +The configuration below overrides Renovate's default `docker` versioning for the `python` Docker image and instead uses the `pep440` versioning scheme to evaluate versions. ```json { @@ -22,7 +38,18 @@ Configuring or overriding the default `versioning` can be helpful for ecosystems } ``` -The above will override Renovate's default of `docker` versioning for the `python` Docker image and instead use `pep440` versioning to evaluate versions. +### Using a custom regex versioning scheme + +```json +{ + "packageRules": [ + { + "matchPackageNames": ["foo/bar"], + "versionScheme": "regex:^(?<compatibility>.*)-v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)?$" + } + ] +} +``` ## Supported Versioning diff --git a/lib/manager/ansible/readme.md b/lib/manager/ansible/readme.md index 4b10e65c89efa420752719a7208a10a6a92fef78..dbada08fb027b746c431593d5d36733749653759 100644 --- a/lib/manager/ansible/readme.md +++ b/lib/manager/ansible/readme.md @@ -1 +1,3 @@ Supports Docker-type dependency extraction from Ansible configuration files. + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/bazel/readme.md b/lib/manager/bazel/readme.md index aef6f2e56e7acd2dbbdffb7823388836b02e35e6..8b0f06ce916faffb3a592101ce156b93e1a5a9d8 100644 --- a/lib/manager/bazel/readme.md +++ b/lib/manager/bazel/readme.md @@ -1 +1,5 @@ -Bazel is quite unlike most other "package managers" that Renovate supports, which usually focus on a particular ecosystem like JavaScript, Ruby or Docker. Instead, Bazel is a build tool so supports a multitude of languages/datasources. Renovate does not support all possible Bazel references, although would like to, and feature requests are welcome. +Bazel is quite unlike most other "package managers" that Renovate supports, which usually focus on a particular ecosystem like JavaScript, Ruby or Docker. +Instead, Bazel is a build tool so supports a multitude of languages/datasources. +Renovate does not support all possible Bazel references, although would like to, and feature requests are welcome. + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/buildkite/readme.md b/lib/manager/buildkite/readme.md index a5de9b3ae094c5ffa246d54ad28380cccdde2541..0c868a09126d2bbf6470fb77e1fdd70c68da614f 100644 --- a/lib/manager/buildkite/readme.md +++ b/lib/manager/buildkite/readme.md @@ -1 +1,3 @@ Used for updating Docker dependencies in Buildkite configuration files. + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/circleci/readme.md b/lib/manager/circleci/readme.md index 6465259d70272a807d9241384ce4f2df79cda280..39533ff501f755db98e6466a9d6ebf377819c3d6 100644 --- a/lib/manager/circleci/readme.md +++ b/lib/manager/circleci/readme.md @@ -1 +1,3 @@ The `circleci` manager extracts both `docker` as well as `orb` datasources from CircleCI config files. + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/cloudbuild/readme.md b/lib/manager/cloudbuild/readme.md index b4f2845b19a1db1a0e248938afeb1117748d2643..c1c54fdb79eea2cf35f23087f5e2fecc2e2deae7 100644 --- a/lib/manager/cloudbuild/readme.md +++ b/lib/manager/cloudbuild/readme.md @@ -1 +1,3 @@ The `cloudbuild` manager extracts `docker` datasources from [Cloud Build config files](https://cloud.google.com/build/docs/configuring-builds/create-basic-configuration). + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/docker-compose/readme.md b/lib/manager/docker-compose/readme.md index 5f11e6ab929b71967a3800f8f04afa850db6b40a..389a5bb6febcf5efbdc6bdf40531c7a21889a0de 100644 --- a/lib/manager/docker-compose/readme.md +++ b/lib/manager/docker-compose/readme.md @@ -1 +1,3 @@ Extracts all Docker images from with Docker Compose YAML files. + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/dockerfile/readme.md b/lib/manager/dockerfile/readme.md index 0bd5e0507339d4f1c8156cf37081c09067ae78a4..81a83b76a041c970cbf0493f19bdae847dab4e7a 100644 --- a/lib/manager/dockerfile/readme.md +++ b/lib/manager/dockerfile/readme.md @@ -1 +1,3 @@ Extracts all Docker images in a `Dockerfile`. + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/droneci/readme.md b/lib/manager/droneci/readme.md index d548370ddd36ac9ab3bcd190e000abd36e2bc124..4c4f6b572dc38ad6560486d4d3ea2a964ef55cee 100644 --- a/lib/manager/droneci/readme.md +++ b/lib/manager/droneci/readme.md @@ -1 +1,3 @@ Extracts Docker-type dependencies from DroneCI config files. + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/gitlabci/readme.md b/lib/manager/gitlabci/readme.md index 761a024dee672a6bee2d81035b5212e30bd93db8..a40d170e7d03251194ddefd0ae79f9c4fdb7b273 100644 --- a/lib/manager/gitlabci/readme.md +++ b/lib/manager/gitlabci/readme.md @@ -1 +1,3 @@ Extracts Docker dependencies from `gitlab-ci.yml` files. + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/helm-requirements/readme.md b/lib/manager/helm-requirements/readme.md index 38ba18ec4115e4cdfea9c41fd037da3b83e2d6c8..bfe38755c569846bed0761211a8956fb259f19f6 100644 --- a/lib/manager/helm-requirements/readme.md +++ b/lib/manager/helm-requirements/readme.md @@ -1,3 +1,5 @@ Renovate supports updating Helm Chart references within `requirements.yaml` files. If your Helm charts make use of Aliases then you will need to configure an `aliases` object in your config to tell Renovate where to look for them. + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/helm-values/readme.md b/lib/manager/helm-values/readme.md index 815f1888f037bf1539d98b5b7d9e3cc480686ae6..a604f2f0c886ae31be5951dcb80cf448a6521b5c 100644 --- a/lib/manager/helm-values/readme.md +++ b/lib/manager/helm-values/readme.md @@ -12,3 +12,5 @@ coreImage: repository: bitnami/harbor-core tag: 2.1.3-debian-10-r38 ``` + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/helmfile/readme.md b/lib/manager/helmfile/readme.md index a77e0773d9ee0e131ebc6a46f18cb88c522a31fb..3dedb96283926bd07a55524a4e771323ca7b24c6 100644 --- a/lib/manager/helmfile/readme.md +++ b/lib/manager/helmfile/readme.md @@ -1 +1,3 @@ Checks `helmfile.yaml` files and extracts dependencies for the `helm` datasource. + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/helmv3/readme.md b/lib/manager/helmv3/readme.md index 7c0cd6e68b343da06659fe82cd37db2734616ee7..c104f73092406f56de4aad58b364ef31930c324b 100644 --- a/lib/manager/helmv3/readme.md +++ b/lib/manager/helmv3/readme.md @@ -1,3 +1,5 @@ Renovate supports updating Helm Chart references within `requirements.yaml` (Helm v2) and `Chart.yaml` (Helm v3) files. If your Helm charts make use of Aliases then you will need to configure an `aliases` object in your config to tell Renovate where to look for them. + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/kubernetes/readme.md b/lib/manager/kubernetes/readme.md index 75671a26684ff60dfae68e7a5249864ea42c22c6..a4ef3e7da23d7131978913118e1ffe6b0fd3a79e 100644 --- a/lib/manager/kubernetes/readme.md +++ b/lib/manager/kubernetes/readme.md @@ -29,3 +29,5 @@ Or if it's just a single file then something like this: } } ``` + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more. diff --git a/lib/manager/terraform/readme.md b/lib/manager/terraform/readme.md index 3d77a390808f4bc7757bf5dd6cda714505578028..4dd832193328887859fdccee0235ee210bf4baf0 100644 --- a/lib/manager/terraform/readme.md +++ b/lib/manager/terraform/readme.md @@ -17,3 +17,5 @@ The following _range_ constraints are also supported: - `~> 1.2.0`: any non-beta version >= 1.2.0 and < 1.3.0, e.g. 1.2.X - `~> 1.2`: any non-beta version >= 1.2.0 and < 2.0.0, e.g. 1.X.Y - `>= 1.0.0`, <= 2.0.0`: any version between 1.0.0 and 2.0.0 inclusive + +If you need to change the versioning format, read the [versioning](https://docs.renovatebot.com/modules/versioning/) documentation to learn more.