Skip to content

Instantly share code, notes, and snippets.

@tehplague
Last active December 12, 2024 19:21
Show Gist options
  • Save tehplague/12ef3c197531a529d31194fd4d66a2dc to your computer and use it in GitHub Desktop.
Save tehplague/12ef3c197531a529d31194fd4d66a2dc to your computer and use it in GitHub Desktop.
Renovate example configuration for TYPO3

Example Configuration for Renovate in TYPO3 Projects (as shown at #T3CRR24)

This Gist provides an example configuration for Renovate, designed to automate updates in TYPO3 projects.
Note: This configuration is a starting point and should be adjusted to fit your specific requirements. The update behavior, in particular, likely has room for improvement depending on your workflow.

Key Assumptions

  1. Git Hosting: The example assumes the use of either GitLab or GitHub for managing TYPO3 projects.
  2. Shared Configuration: A shared GitLab project (gitlab/renovate-config) is used to store general configuration files (.json). This setup allows reusing shared rules across all TYPO3 projects.
  3. Project-Specific Configuration: The renovate.json file must reside in the TYPO3 project repository you wish to update. This file references the shared configuration and defines project-specific overrides.

How to Use This Configuration

  1. Clone or reference the shared configuration repository in your GitLab or GitHub setup.
  2. Place the renovate.json file in the root of the TYPO3 project repository.
  3. Adjust the configuration to suit the dependencies, update schedule, and policies of your project.

For more details on how Renovate works and advanced configuration options, check out the Renovate documentation.

License

MIT License

Copyright (c) 2024 Marketing Factory Digital GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":disableMajorUpdates",
":combinePatchMinorReleases"
],
"prHourlyLimit": 0,
"prConcurrentLimit": 0,
"baseBranches": [
"develop"
],
"composer": {
"fileMatch": [
"^/composer\\.json$"
]
},
"enabledManagers": [
"composer"
],
"autodiscoverNamespaces": [
],
"commitMessagePrefix": "[RENOVATE] ",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": " ({{{displayFrom}}} => {{{displayTo}}})",
"hostRules": [
{
"matchHost": "elts.typo3.com",
"hostType": "packagist",
"username": "***REDACTED***",
"password": "***REDACTED***"
},
{
"matchHost": "https://npm.fontawesome.com/",
"hostType": "npm",
"token": "***REDACTED***"
}
],
"lockFileMaintenance": {
"enabled": true,
"schedule": "before 1pm every day"
},
"platform": "gitlab",
"platformAutomerge": true,
"ignoreTests": true
}
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>gitlab/renovate-config"
],
"packageRules": [
{
"matchUpdateTypes": [
"minor",
"pin",
"digest",
"patch",
"bump"
],
"matchManagers": [
"dockerfile"
],
"labels": [
"docker"
],
"enabled": true,
"automerge": true
}
]
}
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>gitlab/renovate-config",
"config:js-app",
"npm:unpublishSafe"
],
"enabledManagers": [
"npm"
],
"packageRules": [
{
"matchUpdateTypes": [
"minor",
"pin",
"digest",
"patch",
"lockFileMaintenance",
"bump"
],
"matchManagers": [
"npm"
],
"matchDepTypes": [
"dependencies",
"peerDependencies"
],
"matchPackagePatterns": [
"*"
],
"rangeStrategy": "replace",
"groupName": "frontend runtime dependencies",
"enabled": true
},
{
"matchUpdateTypes": [
"minor",
"pin",
"digest",
"patch",
"lockFileMaintenance",
"bump"
],
"matchManagers": [
"npm"
],
"matchDepTypes": [
"devDependencies"
],
"matchPackagePatterns": [
"*"
],
"rangeStrategy": "replace",
"groupName": "frontend build dependencies",
"enabled": true,
"automerge": true
},
{
"matchPackageNames": [
"bootstrap-package"
],
"matchManagers": [
"npm"
],
"enabled": false
}
]
}
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"enabledManagers": [
"composer",
"dockerfile",
"npm"
],
"lockFileMaintenance": {
"automerge": true
},
"extends": [
"local>gitlab/renovate-config:typo3",
"local>gitlab/renovate-config:docker",
"local>gitlab/renovate-config:frontend"
]
}
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>gitlab/renovate-config"
],
"packageRules": [
{
"matchUpdateTypes": [
"minor",
"digest",
"patch",
"lockFileMaintenance"
],
"matchManagers": [
"composer"
],
"matchPackagePrefixes": [
"bk2k/bootstrap-package"
],
"groupName": "Bootstrap package",
"labels": [
"bootstrap"
],
"enabled": true
},
{
"matchUpdateTypes": [
"minor",
"digest",
"patch",
"lockFileMaintenance"
],
"matchManagers": [
"composer"
],
"matchDepTypes": [
"require"
],
"matchPackagePatterns": [
"*"
],
"groupName": "PHP packages",
"excludePackagePatterns": [
"bk2k/bootstrap-package"
],
"rangeStrategy": "replace"
},
{
"matchUpdateTypes": [
"minor",
"digest",
"patch",
"lockFileMaintenance"
],
"matchManagers": [
"composer"
],
"matchDepTypes": [
"require"
],
"matchPackagePatterns": [
"giggsey/libphonenumber-for-php",
"guzzlehttp/psr7",
"jms/*",
"nesbot/carbon",
"ocramius/package-versions",
"php-http/*",
"sentry/sentry",
"symfony/*"
],
"groupName": "known good packages",
"automerge": true,
"rangeStrategy": "replace"
},
{
"matchUpdateTypes": [
"minor",
"digest",
"patch",
"pin",
"lockFileMaintenance"
],
"matchManagers": [
"composer"
],
"matchDepTypes": [
"require-dev"
],
"matchPackagePatterns": [
"*"
],
"groupName": "development dependencies",
"excludePackagePatterns": [
"^typo3/"
],
"enabled": true,
"automerge": true,
"rangeStrategy": "pin"
},
{
"matchUpdateTypes": [
"bump",
"pin"
],
"matchManagers": [
"composer"
],
"enabled": false
}
],
"postUpgradeTasks": {
"commands": ["composer update -W"],
"fileFilters": ["composer.lock"],
"executionMode": "update"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment