Skip to content

Commit

Permalink
[FEATURE] Support GitLab CI/CD components
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrodala committed Dec 11, 2023
1 parent 05348b6 commit 9d153ea
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ The `default.json`:
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": " ({{{displayFrom}}} => {{{displayTo}}})",
"composerIgnorePlatformReqs": null,
"customManagers": [
// See below
],
"platformAutomerge": true,
"rangeStrategy": "update-lockfile",
"packageRules": [
Expand All @@ -47,6 +50,27 @@ The various parts explained:
[TASK] Update <package> (<old-version> => <new-version>)

- [`composerIgnorePlatformReqs`](https://docs.renovatebot.com/configuration-options/#composerignoreplatformreqs) lets Composer respect platform requirements (e.g. PHP version)
- [`customManagers`](https://docs.renovatebot.com/modules/manager/regex/):

```json
{
"customType": "regex",
"fileMatch": [
"\\.gitlab-ci\\.ya?ml$",
"templates/.+\\.ya?ml$"
],
"versioningTemplate": "semver",
"datasourceTemplate": "gitlab-releases",
"registryUrlTemplate": "https://{{{registryUrl}}}",
"depTypeTemplate": "repository",
"matchStrings": [
"component: (?<registryUrl>[^\\s\\/]+)\\/(?<depName>\\S+)\\/[^\\s\\/]+@(?<currentValue>\\S+)"
]
}
```

See [Support GitLab CI/CD components](https://github.com/renovatebot/renovate/issues/23431#issuecomment-1846446671)

- [`platformAutomerge`](https://docs.renovatebot.com/configuration-options/#platformautomerge) enables the platform-native auto-merge capabilities so that update PRs can be merged automatically without interaction.
- [`rangeStrategy`](https://docs.renovatebot.com/configuration-options/#rangestrategy) prefers lockfile updates (e.g. `composer.lock`), otherwise updates version constraints (e.g. `^1.0` to `^2.0`)
- [`packageRules`](https://docs.renovatebot.com/configuration-options/#packagerules):
Expand Down
16 changes: 16 additions & 0 deletions default.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": " ({{{displayFrom}}} => {{{displayTo}}})",
"composerIgnorePlatformReqs": null,
"customManagers": [
{
"customType": "regex",
"fileMatch": [
"\\.gitlab-ci\\.ya?ml$",
"templates/.+\\.ya?ml$"
],
"versioningTemplate": "semver",
"datasourceTemplate": "gitlab-releases",
"registryUrlTemplate": "https://{{{registryUrl}}}",
"depTypeTemplate": "repository",
"matchStrings": [
"component: (?<registryUrl>[^\\s\\/]+)\\/(?<depName>\\S+)\\/[^\\s\\/]+@(?<currentValue>\\S+)"
]
}
],
"platformAutomerge": true,
"rangeStrategy": "update-lockfile",
"packageRules": [
Expand Down

0 comments on commit 9d153ea

Please sign in to comment.