renovate

Renovate complains about docker compose


with this config.js

module.exports = {
  "automerge": false,
  "docker-compose": {"enabled": true},
  "dryRun" : "true",
  "fileMatch": [
    "(^|/)(?:docker-)?compose[^/]*\\.ya?ml$"
  ],
  "extends": ["config:recommended", ":skipStatusChecks"],
  "gitLabIgnoreApprovals": false,
  "platformAutomerge": false,
  "platform": "local"
}

when renovate starts with a local run and finds a docker-compose file which starts like this

version: '3.8'

    services:
    ....

it complains

WARN: cli config dryRun property has been changed to full
INFO: Repository started (repository=local)
   "renovateVersion": "36.35.1"
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git

WARN: Failed to parse osgi file (repository=local, packageFile=compose.yml)
   "err": {
     "lineNumber": 1,
     "columnNumber": 1,
     "message": "JSON5: invalid character 'v' at 1:1",

the docker compse works fine but why does renovate bot complain ?


Solution

  • Failed to parse osgi file

    It looks like Renovate is assuming your file is to be managed by the osgi manager. And then the format of the file is invalid.

    This is surprising as the file name does not relate at all with OSGi.

    This comes from the fact that you have added a specific fileMatch which adds the compose file in all managers even that doesn't make sense.

    Solution: remove the top-level fileMatch.