azure-devopsrenovate

Renovate CLI "allowedCommands" not getting resolved in packageRule level


I am trying to set up Renovate CLI in AzureDevOps and run a bash script as part of postUpgradeTasks to edit version number but its failing with below warning :

       "repoProblems": [
         "WARN: Found renovate config warnings",
         "WARN: Post-upgrade task did not match any on allowedCommands list",
         "WARN: Error updating branch",
         "WARN: Error executing gradle wrapper update command. It can be not a critical one though.",
         "WARN: Package lookup failures"
       ] 

The issue seems to be below one from logs :

WARN: Post-upgrade task did not match any on allowedCommands list (repository=SST/service-digital-wallet, branch=renovate/major-major-dependencies5)
       "dep": "nebula.lint",
       "cmd": "./script/bump-version.sh major",
       "allowedCommands": []

Looks like the top level "allowedCommands" is not getting resolved in "packageRules" level.

Please find my complete renovate.json file below :

{
  "extends": [
    "config:base"
  ],
  "recreateWhen": "always",
  "recreateClosed": true,
  "allowedCommands": [
    "regex:^\\.\\/script\\/bump-version\\.sh (patch|minor|major)$"
  ],
  "packageRules": [
    {
      "matchPackagePatterns": [
        "*"
      ],
      "matchUpdateTypes": [
        "patch"
      ],
      "groupName": "patch dependencies5",
      "postUpgradeTasks": {
        "commands": [
          "./script/bump-version.sh patch"
        ],
        "fileFilters": [
          "VERSION.txt"
        ],
        "executionMode": "update"
      }
    },
    {
      "matchPackagePatterns": [
        "*"
      ],
      "matchUpdateTypes": [
        "minor"
      ],
      "groupName": "minor dependencies5",
      "postUpgradeTasks": {
        "commands": [
          "./script/bump-version.sh minor"
        ],
        "fileFilters": [
          "VERSION.txt"
        ],
        "executionMode": "update"
      }
    },
    {
      "matchPackagePatterns": [
        "*"
      ],
      "matchUpdateTypes": [
        "major"
      ],
      "groupName": "major dependencies5",
      "postUpgradeTasks": {
        "commands": [
          "./script/bump-version.sh major"
        ],
        "fileFilters": [
          "VERSION.txt"
        ],
        "executionMode": "update"
      }
    }
  ]
}

Can someone help to point out what is going wrong.


Solution

  • The allowedCommands configuration option cannot be specified in the user renovate.json but it has to be defined in the global configuration file

    Each command must match at least one of the patterns defined in allowedCommands (a global-only configuration option) in order to be executed. If the list of allowed tasks is empty then no tasks will be executed.

    https://docs.renovatebot.com/configuration-options/#postupgradetasks

    If you do not have enough privileges you will need to reach out to the admin responsible for setting up Renovate in your Azure instance