Skip to content

Commit

Permalink
docs: Improve dev workflow for renovate
Browse files Browse the repository at this point in the history
The make target is more discoverable and easier to use, and we can
switch to the 'slim' image while we're at it which will speed up the
time to run the linter especially on slow Internet connections.

Suggested-by: Chance Zibolski <[email protected]>
Signed-off-by: Joe Stringer <[email protected]>
  • Loading branch information
joestringer committed Nov 8, 2024
1 parent aa0a7d7 commit 98790b2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
28 changes: 19 additions & 9 deletions Documentation/contributing/development/renovate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,25 @@ errors in the configuration.
#. Make some changes to the Renovate configuration in ``.github/renovate.json5``.
#. Run the renovate image against the new configuration.

.. code-block:: shell-session
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
.. tabs::

.. group-tab:: Simple

.. code-block:: shell-session
make renovate-local
.. group-tab:: Advanced

.. code-block:: shell-session
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:slim \
renovate --platform=local \
| tee renovate.log
This approach is based on the `Local platform guide <https://docs.renovatebot.com/modules/platform/local/>`__
provided by Renovate. See that guide for more details about usage and
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -530,3 +530,13 @@ run_bpf_tests: ## Build and run the BPF unit tests using the cilium-builder cont

run-builder: ## Drop into a shell inside a container running the cilium-builder image.
DOCKER_ARGS=-it contrib/scripts/builder.sh bash

.PHONY: renovate-local
renovate-local: ## Run a local linter for the renovate configuration
$(CONTAINER_ENGINE) run --rm -ti \
-e LOG_LEVEL=debug \
-e GITHUB_COM_TOKEN="$(gh auth token)" \
-v /tmp:/tmp \
-v $(ROOT_DIR):/usr/src/app \
docker.io/renovate/renovate:slim \
renovate --platform=local

0 comments on commit 98790b2

Please sign in to comment.