Updating dependencies with Renovate

The Cilium project uses Renovate Bot to maintain and update dependencies on a regular basis. This guide describes how to contribute a PR which modifies the Renovate configuration. There are two complementary methods for validating Renovate changes: Linting with the “local” platform, and testing the updates in your own fork.

Linting locally

Use the renovate/renovate docker image to perform a dry run of Renovate. This step should complete in less than ten minutes, and it will report syntax errors in the configuration.

  1. Make some changes to the Renovate configuration in .github/renovate.json5.

  2. Run the renovate image against the new configuration.

    docker run -ti -e LOG_LEVEL=debug \
               -e GITHUB_COM_TOKEN="$(gh auth token)" \
               -v /tmp:/tmp \
               -v $(pwd):/usr/src/app \
               docker.io/renovate/renovate:full \
               renovate --platform=local \
    | tee renovate.log

This approach is based on the Local platform guide provided by Renovate. See that guide for more details about usage and limitations.

Testing on a fork

For most changes to the Renovate configuration, you will likely need to test the changes on your own fork of Cilium.

  1. Make some changes to the Renovate configuration. Renovate is configured in .github/renovate.json5.

  2. (Optional) Disable unrelated configuration. For an example, see this commit.

  3. Push the branch to the default branch of your own fork.

  4. Enable the Renovate GitHub app in your GitHub account.

  5. Ensure that Renovate is enabled in the repository settings in the Renovate Dashboard.

  6. Trigger the Renovate app from the dashboard or push a fresh commit to your fork’s default branch to trigger Renovate again.

  7. Use the dashboard to trigger Renovate to create a PR on your fork and validate that the proposed PRs are updating the correct parts of the codebase.

Once you have tested that the Renovate configuration works in your own fork, create a PR against Cilium and provide links in the description to inform reviewers about the testing you have performed on the changes.