Repository navigation
fix(gitlab): keep Renovate off the images of the managed jobs - #58
Merged
Merged
Conversation
Renovate reads .gitlab-ci.yml, and repokeeper's own jobs there name images with a version: renovate/renovate to the patch, node, the .NET SDK. Its first real run opened a merge request raising the renovate/renovate tag, which is an edit to a managed key: repokeeper check reports it and the next update takes it back, and a new one would follow every week. The generated renovate.json now disables updates of those images in .gitlab-ci.yml. A test builds the CI file of every fixture and fails when a managed job pins an image that is not on the list. On the pilot project Renovate then closed its merge request itself and no longer lists the managed images.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by the first real Renovate run on GitLab, on the python pilot project.
What went wrong
Renovate reads
.gitlab-ci.ymllike any other file, and repokeeper's own jobs there name images with a version:renovate/renovate:44.128.1,node:24, the .NET SDK of the dotnet and powershell jobs. Renovate's first run opened a merge request that raised therenovate/renovatetag: an edit to a managed key. Merged, it would be reported byrepokeeper checkand taken back by the nextrepokeeper update; and since that image is named to the patch, a new one would come every week.The fix
The generated
renovate.jsongets one more package rule: in.gitlab-ci.yml, the images repokeeper's jobs pin to a version are not updated. They are the standard's to move, withrepokeeper update.{ "matchManagers": ["gitlabci"], "matchFileNames": [".gitlab-ci.yml"], "matchPackageNames": ["node", "renovate/renovate", "mcr.microsoft.com/dotnet/sdk"], "enabled": false }A test builds the CI file of every fixture on GitLab and fails when one of repokeeper's jobs pins an image that is not on this list (seen failing with an entry taken out).
One side effect, documented in
docs/gitlab.md: a job of the user's own in.gitlab-ci.ymlthat uses one of these images is not updated either.Only GitLab's
renovate.jsonchanges, so the standard stays 1.4.3, as with the earlier changes to the GitLab output.Tested on GitLab
With a build of this branch, packed and installed as the published package would be, on the private pilot
repokeeper-demo-gitlab-python:renovatejob, and its dashboard listednode 24(twice) andrenovate/renovateunder.gitlab-ci.yml.repokeeper updatewrote the new rule intorenovate.json; pushed; the Renovate schedule run again.alpine 3) under.gitlab-ci.yml. The project's own dependencies (pyproject.toml) are still listed.npm run lint,npm run typecheck,npm test(426 tests).Also in the docs
Renovate's run warned that github.com limits requests without a token, and skipped release notes.
docs/gitlab.mdnow names the optionalGITHUB_COM_TOKENvariable. That variable was not tried on the pilot.Not tested
nodemajor: none was on offer during the runs, so that the rule holds it back was not seen, only thatnodeleft the dashboard's list.🤖 Generated with Claude Code