From 98790b29ca3ceb2719ce1c66b863e9c17970945c Mon Sep 17 00:00:00 2001 From: Joe Stringer Date: Thu, 31 Oct 2024 17:02:27 -0700 Subject: [PATCH] docs: Improve dev workflow for renovate 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 Signed-off-by: Joe Stringer --- .../contributing/development/renovate.rst | 28 +++++++++++++------ Makefile | 10 +++++++ 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/Documentation/contributing/development/renovate.rst b/Documentation/contributing/development/renovate.rst index d8205286f1bad..fa1c653227339 100644 --- a/Documentation/contributing/development/renovate.rst +++ b/Documentation/contributing/development/renovate.rst @@ -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 `__ provided by Renovate. See that guide for more details about usage and diff --git a/Makefile b/Makefile index 8ba100fa1ff53..c6797a3a5cc76 100644 --- a/Makefile +++ b/Makefile @@ -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