renovate/docs/development/configuration.md
2019-09-09 04:16:04 +02:00

2.1 KiB

Configuration

Configuration Methods

Configuration is supported via any or all of the below:

  • Configuration file
  • Environment
  • CLI
  • renovate.json, renovate.json5, .github/renovate.json, .github/renovate.json5, .renovaterc.json, or .renovaterc in target repository
  • renovate field of package.json in target repository

The above are listed in reverse order of preference. e.g. CLI values will override environment values if they conflict.

Default Configuration

Default configuration values can be found in lib/config/definitions.ts

Configuration File

You can override default configuration using a configuration file, with default name config.js in the working directory. If you need an alternate location or name, set it in the environment variable RENOVATE_CONFIG_FILE.

Using a configuration file gives you very granular configuration options. For instance, you can override most settings at the global (file), repository, or package level. e.g. apply one set of labels for backend/package.json and a different set for frontend/package.json in the same repository.

module.exports = {
  npmrc: '//registry.npmjs.org/:_authToken=abc123',
  baseDir: '/tmp/renovate',
  logLevel: 'debug',
  includeForks: true,
  gradle: { enabled: false },
};

CLI

$ node renovate --help

To configure any <list> items, separate with commas. E.g. renovate --labels=renovate,dependency.

renovate.json

If you add a renovate.json file to the root of your repository, you can use this to override default settings.

package.json

If you add configuration options to your package.json then these will override any other settings above.

"renovate": {
  "labels": [
    "upgrade",
    "bot"
  ]
}

Configuration Options

Please see https://docs.renovatebot.com/configuration-options/ for a list of user-facing configuration options.

For further options when running your own instance of Renovate, please see the full config definitions file at lib/config/definitions.ts.