0

I would like to differentiate multiple Java versions in Renovate. The problem is, let's say the Tags which I'm getting are all under https://www.gitlab.com/binaries. They look like this:

  • 22.11.0-java17-1
  • 23.2.0-java8-1
  • 23.2.0-java11-1

Now when I want to upgrade Java 11 dependency in my file I have to differentiate that so that java11 doesn't get updated to java17 because it shouldn't and I don't know how to specify that. I tried to use this PackageRule:

"packageRules": [
    {
      "descripton": "dependencys via gitlab Tags",
      "matchDatasources": [
        "gitlab-tags"
      ],
      "registryUrls": ["https://gitlab.com"],
      "matchPackagePrefixes": ["/binaries"],
      "extractVersion": "^(v)?(?<version>.*)$",
      "versioning": "regex:^(?<major>\\d+)\\.(?<minor>.*)-java\\d+?(-\\d)"
    }
  ],

and using this regex Manager to diffrentiate

  "regexManagers": [
    {
      "fileMatch": [
        ".*cfg-"
      ],
      "matchStrings": [
        "PF_APLAT_JAVA8:?[\\s\\S](?<currentValue>\\d+\\.\\d.\\d+-java8(-\\d+)?)"
      ],
      "datasourceTemplate": "gitlab-tags",
      "depNameTemplate": "/binaries"
    },
    {
      "fileMatch": [
        ".*cfg-"
      ],
      "matchStrings": [
        "PF_APLAT_JAVA11:?[\\s\\S](?<currentValue>\\d+\\.\\d.\\d+-java11(-\\d+)?)"
      ],
      "datasourceTemplate": "gitlab-tags",
      "depNameTemplate": "/binaries"
    }
  ]
DobbyTheElf
  • 604
  • 6
  • 21
Tim Reber
  • 9
  • 2

0 Answers0