Skip to content
Snippets Groups Projects
Select Git revision
  • 82c7f2266c4ee16c2aff22ba1185fa43fd6cb21b
  • main default protected
  • next
  • renovate/main-redis-5.x
  • fix/36615b-branch-reuse-no-cache
  • chore/punycode
  • fix/36615-branch-reuse-bug
  • refactor/pin-new-value
  • feat/36219--git-x509-signing
  • feat/structured-logger
  • hotfix/39.264.1
  • feat/skip-dangling
  • gh-readonly-queue/next/pr-36034-7a061c4ca1024a19e2c295d773d9642625d1c2be
  • hotfix/39.238.3
  • refactor/gitlab-auto-approve
  • feat/template-strings
  • gh-readonly-queue/next/pr-35654-137d934242c784e0c45d4b957362214f0eade1d7
  • fix/32307-global-extends-merging
  • fix/32307-global-extends-repositories
  • gh-readonly-queue/next/pr-35009-046ebf7cb84ab859f7fefceb5fa53a54ce9736f8
  • gh-readonly-queue/next/pr-35009-9d5e583b7d7251148ab0d11ee8dd38149618d162
  • 41.17.2
  • 41.17.1
  • 41.17.0
  • 41.16.3
  • 41.16.2
  • 41.16.1
  • 41.16.0
  • 41.15.0
  • 41.14.0
  • 41.13.1
  • 41.13.0
  • 41.12.1
  • 41.12.0
  • 41.11.1
  • 41.11.0
  • 41.10.1
  • 41.10.0
  • 41.9.0
  • 41.8.0
  • 41.7.2
41 results

use-cases.md

Blame
  • self-hosted-configuration.md 31.48 KiB
    title: Self-Hosted configuration
    description: Self-Hosted configuration usable in config file, CLI or environment variables

    Self-Hosted configuration options

    You can only use these configuration options when you're self-hosting Renovate.

    Please also see Self-Hosted Experimental Options.

    !!! note Config options with type=string are always non-mergeable, so mergeable=false.

    allowCustomCrateRegistries

    allowPlugins

    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 needed 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 decide which commands in postUpgradeTasks are allowed to run. If this list is empty then no tasks will be executed.