-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use renovate with dart #4533
Use renovate with dart #4533
Conversation
/build |
@@ -68,7 +68,8 @@ linters: | |||
## stable dart sdk: https://dart.dev/get-dart#release-channels | |||
## install alpine-pkg-glibc (glibc compatibility layer package for Alpine Linux) | |||
dockerfile: | |||
- ARG DART_VERSION='2.8.4' | |||
# renovate: datasource=dart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's two required fields in that regex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what do I have to put depName=dart
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took this https://docs.renovatebot.com/presets-customManagers/#custommanagersdockerfileversions, and adapted it to allow changing our descriptor files too. Plus adapted our build scripts to keep the comment together with the arg when writing dockerfiles
More understandable docs:
https://docs.renovatebot.com/modules/manager/regex/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renovate handles a lot of things, formats, sources, etc. But at some point, it needs to know where to look, and what to look for. In a custom manager, it can't know where to look, unlike if it was a npm package.json, it would look in the npm registry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@echoix as far as I understand the correct datasource is: https://docs.renovatebot.com/modules/datasource/dart-version/
And looking at this example we can use depName=dart
as I said: renovatebot/renovate#26761 (reply in thread)
🦙 MegaLinter status:
|
Descriptor | Linter | Files | Fixed | Errors | Elapsed time |
---|---|---|---|---|---|
✅ API | spectral | 1 | 0 | 1.49s | |
bash-exec | 6 | 1 | 0.03s | ||
✅ BASH | shellcheck | 6 | 0 | 0.23s | |
✅ BASH | shfmt | 6 | 0 | 0 | 0.9s |
✅ COPYPASTE | jscpd | yes | no | 3.73s | |
✅ DOCKERFILE | hadolint | 129 | 0 | 25.3s | |
✅ JSON | jsonlint | 20 | 0 | 0.22s | |
✅ JSON | v8r | 22 | 0 | 13.99s | |
markdownlint | 267 | 0 | 303 | 22.81s | |
✅ MARKDOWN | markdown-table-formatter | 267 | 0 | 0 | 158.27s |
bandit | 215 | 66 | 3.04s | ||
✅ PYTHON | black | 215 | 0 | 0 | 5.09s |
✅ PYTHON | flake8 | 215 | 0 | 1.92s | |
✅ PYTHON | isort | 215 | 0 | 0 | 1.36s |
✅ PYTHON | mypy | 215 | 0 | 16.52s | |
✅ PYTHON | pylint | 215 | 0 | 33.95s | |
✅ PYTHON | ruff | 215 | 0 | 0 | 0.69s |
✅ REPOSITORY | checkov | yes | no | 35.25s | |
✅ REPOSITORY | git_diff | yes | no | 0.81s | |
grype | yes | 26 | 14.04s | ||
✅ REPOSITORY | secretlint | yes | no | 12.36s | |
✅ REPOSITORY | trivy | yes | no | 15.55s | |
✅ REPOSITORY | trivy-sbom | yes | no | 0.29s | |
trufflehog | yes | 1 | 53.54s | ||
✅ SPELL | cspell | 718 | 0 | 12.46s | |
lychee | 349 | 23 | 6.45s | ||
✅ XML | xmllint | 3 | 0 | 0 | 1.17s |
✅ YAML | prettier | 160 | 0 | 0 | 3.91s |
✅ YAML | v8r | 102 | 0 | 29.53s | |
✅ YAML | yamllint | 161 | 0 | 3.17s |
See detailed report in MegaLinter reports
# renovate: datasource=dart-version depName=dart | ||
- ARG DART_VERSION='3.6.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems only like a comment in the descriptor, not copied over to the Dockerfiles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
/build
|
Version of dartanalyzer doesn't seem properly captured. Also: Fatal error while calling dartanalyzer: [Errno 2] No such file or directory: 'dartanalyzer' Did the binary name change since the last very old version? |
It seems that, in fact, it no longer exists: EDIT: It seems to be done this way now: https://dart.dev/tools/dart-analyze @nvuillam to be able to run it as “dart analyze” is there any parameter of the descriptor that allows it? It's to avoid creating a class in python just for that. |
Ready @nvuillam! In the end it took me more work because of the jump from 2.x to 3.x. |
I have taken the opportunity to change urls and make it work to get the version of the linter |
In this case, it had a really old fixed version