-
HonkingGoose authoredHonkingGoose authored
title: Self-Hosted configuration
description: Self-Hosted configuration usable in config file, CLI or environment variables
Self-Hosted configuration options
The configuration options listed in this document are applicable to self-hosted instances of Renovate ("the bot").
Please also see Self-Hosted Experimental Options.
allowCustomCrateRegistries
allowPostUpgradeCommandTemplating
Set to true to allow templating of dependency level post-upgrade commands.
Let's look at an example of configuring packages with existing Angular migrations.
Add two properties to config.js
: allowPostUpgradeCommandTemplating
and allowedPostUpgradeCommands
:
module.exports = {
allowPostUpgradeCommandTemplating: true,
allowedPostUpgradeCommands: ['^npm ci --ignore-scripts$', '^npx ng update'],
};
In the renovate.json
file, define the commands and files to be included in the final commit.
The command to install dependencies (npm ci --ignore-scripts
) is necessary because, by default, the installation of dependencies is skipped (see the skipInstalls
global option).
{
"packageRules": [
{
"matchPackageNames": ["@angular/core"],
"postUpgradeTasks": {
"commands": [
"npm ci --ignore-scripts",
"npx ng update {{{depName}}} --from={{{currentVersion}}} --to={{{newVersion}}} --migrate-only --allow-dirty --force"
],
"fileFilters": ["**/**"]
}
}
]
}
With this configuration, the executable command for @angular/core
looks like this:
npm ci --ignore-scripts
npx ng update @angular/core --from=10.0.0 --to=11.0.0 --migrate-only --allow-dirty --force
allowScripts
allowedPostUpgradeCommands
A list of regular expressions that determine which commands in postUpgradeTasks
are allowed to be executed.
If this list is empty then no tasks will be executed.
e.g.
{
"allowedPostUpgradeCommands": ["^tslint --fix$", "^tslint --[a-z]+$"]
}