jycouet / VSTSExtensions

MIT License
30 stars 11 forks source link

Multiple repo approach not working #43

Closed timmkrause closed 3 years ago

timmkrause commented 3 years ago

Describe the bug I am trying to have a centralized repo/config/Renovate pipeline for multiple repositories approach but the configured repositories are not being targeted.

To Reproduce

module.exports = {
    repositories: ['org/repo-a', 'org/repo-b']
};
DEBUG: Parsing configs

DEBUG: Checking for config file in /azp/agent/_work/1/s/config

DEBUG: File config
       "config": {
         "repositories": [
           "org/repo-a",
           "org/repo-b"
         ]
       }

DEBUG: CLI config
       "config": {
         "repositories": ["org/renovate-repo"],
         "platform": "azure",
         "endpoint": "https://my.azure-devops.com/...",
         "token": "***********",
         "hostRules": [
           {"domainName": "github.com", "token": "***********"},
           {
             "domainName": "my.azure-devops.com",
             "username": "irrelephant",
             "password": "***********"
           }
         ]
       }

DEBUG: Env config
       "config": {"hostRules": []}

DEBUG: Combined config
       "config": {
         "repositories": ["org/renovate-repo"],
         "hostRules": [
           {"domainName": "github.com", "token": "***********"},
           {
             "domainName": "my.azure-devops.com",
             "username": "irrelephant",
             "password": "***********"
           }
         ],
         "platform": "azure",
         "endpoint": "https://my.azure-devops.com/...",
         "token": "***********"
       }

Expected behavior The combined config should contain repositories read from file config (coming from/configured in config.js).

Additional context

    "autodiscover": true,
    "autodiscoverFilter": "org/{repo-a,repo-b}"

in renovate.json but this does not seem to activate anything, at least there are no logs about the discovery process.

trigger: none

pool:
  name: ubuntu-18.04

steps:
- task: UseNode@1
  displayName: 'Use Node 14.17.0'
  inputs:
    version: 14.17.0

- task: jyc.vsts-extensions-renovate-me.default-build-task.RenovateMe@0
  displayName: Renovate
  inputs:
    renovateOptionsArgs: '--host-rules="[{\"domainName\":\"github.com\",\"token\":\"$(GITHUB_COM_TOKEN)\"},{\"domainName\":\"my.azure-devops.com\",\"username\":\"irrelephant\",\"password\":\"$(AZURE_DEVOPS_NUGET_PAT)\"}]"'
timmkrause commented 3 years ago

@jycouet Any ideas?

jycouet commented 3 years ago

Thx for the reminder, sorry I was not here last days.

Actually that's why I called it RenovateME, it's because it's only the repo selected. It's the feature I wanted when I developed this extension. My idea (and usage) is to setup a RenovateMe per repo. Like this they can have their own lifecycle, own config, ... and it's available in a few lines/clicks.

If you want to have a single place to manage multiple repos, I think that you should go with Renovate directly.

Hope it helps, Feel free to re open if needed.

timmkrause commented 3 years ago

Thank you so much for the quick clarification.