Child pages
  • Renovate bot (version 25.56.7)

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Configure a token in GitHub (requires a Github account)

    Renovate need a personnal token in GitHub to fetch the release notes.
    Create a personal access token for the bot account (select "repo" permissions):
    Follow the guide: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

    Save the token for step 4.

  2. Configure a token in stash

    Go to your account > Personal Access token > Create a token
    - Tokenname: renovatebot
    - Permissions: Read project / Write repo. (For a fist try to can set it to read/read) to debug your config.

    Save the token for step 4.

  3. Create a file into your repo renovate.json (Optional)
    {

      "$schema": "https://docs.renovatebot.com/renovate-schema.json",
    "extends": [
      "config:base"
    ],
      "prConcurrentLimit": 5

    }

    Then push this file to your repo. This will 'activate' the next renovate run on the selected repository.
    Otherwise, you will face the debug note: config file not found or Repository is disabled. And renovate will not create any PRs.

    OR

    You can bypass this step by adding the two following parameters to your configuration:

    "onboarding": false,
    "requireConfig": false


    See: - https://docs.renovatebot.com/self-hosted-configuration/#requireconfig
             - https://docs.renovatebot.com/self-hosted-configuration/#onboarding


  4. Configure your renovate.json 

    Don't forget to update the following document with YOUR repository(fork) name and to adapt the configuration according to your needs.

    https://docs.renovatebot.com/self-hosted-configuration/

    {
    "$schema": "https://docs.renovatebot.com/renovate-schema.json",
    "extends": [
    "config:base"
    ],
    "endpoint": "https://stash.forgerock.org/",
    "repositories": [
    "~violette/openig-renovate"
    ],
    "platform": "bitbucket-server",
    "prConcurrentLimit": 5,
    "branchConcurrentLimit": 5,
    "prBodyColumns": [
    "Package",
    "Update",
    "New value",
    "Package file",
    "References"
    ],
    "enabledManagers": [
    "maven"
    ],
    "packageRules": [
    {
    "enabled": false,
    "matchPackagePatterns": [ // This is to manage package exclusion
    "javax.servlet"
    ]
    },
    {
    "registryUrls": [
    "https://repo.maven.apache.org/maven2/"
    ],
    "automerge": false,
    "matchManagers": [
    "maven"
    ]
    },
    {
    "matchPaths": [ // redundant with the enabledManagers in IG case - given as example - package exclusion for UI in this case
    "openig-ui/**"
    ],
    "automerge": false,
    "enabled": false
    }
    ],
    "automerge": false,
    "autodiscover": false,
    "includeForks": true,
    "onboarding": false,
    "requireConfig": false
    }





  5. Run the self-hosted configuration

    Run the following docker command:


    Code Block
    languagebash
    titledocker run
    docker run --rm -it -v $PWD/renovate.json:/usr/src/app/config.json -e RENOVATE_USERNAME='<STASH USERNAME>' -e RENOVATE_PASSWORD='<STASH_TOKEN>' -e GITHUB_COM_TOKEN='<GITHUB_TOKEN>' -e LOG_LEVEL=debug renovate/renovate


    Note the -e is used to set the environment variables, LOG_LEVEL=debug is optional.


...

If you complete successfully the above configuration, you should see on your screen DEBUG lines and the process should be launched. 

Check in the output that your configuration is used (debug mode only)

The process can be a bit long.After what, if you open your stash, you should see PR/branches created in your repositoryfork.

More:

  • Private maven repositories can be configured, this require to add hostRules with required authentication tokens.

...