-
Notifications
You must be signed in to change notification settings - Fork 129
chore: add hadolint action #974
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
base: master
Are you sure you want to change the base?
chore: add hadolint action #974
Conversation
WalkthroughThese changes introduce Dockerfile linting to the CI pipeline via hadolint, optimize Docker builds by consolidating RUN steps, and improve shell variable handling robustness in build scripts. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thanks for your PR,
To skip the vendors CIs, Maintainers can use one of:
|
315c164 to
afd1364
Compare
add hadolint check action Signed-off-by: adrianc <[email protected]>
afd1364 to
2d6c760
Compare
Pull Request Test Coverage Report for Build 19897714211Details
💛 - Coveralls |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/test.yml (1)
123-123: Minor: Remove trailing space in step name.Line 123 has "checkout PR " with a trailing space. For consistency with other step names, change to "checkout PR".
- - name: checkout PR + - name: checkout PR
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/test.yml(1 hunks)Dockerfile(1 hunks)Dockerfile.sriov-network-config-daemon(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: test-coverage
- GitHub Check: Golangci-lint
- GitHub Check: build
- GitHub Check: test
- GitHub Check: Analyze (go)
🔇 Additional comments (4)
Dockerfile (1)
4-5: Consolidating RUN steps is a solid Docker layer optimization.The merge of the two
makecommands into a single RUN instruction with proper chaining (&&) and continuation reduces image layers. Both commands retain their original execution order and error handling semantics.Dockerfile.sriov-network-config-daemon (1)
10-10: Improved shell robustness with proper quoting and printf formatting.The changes enhance defensive coding: quoting
"${ARCH_DEP_PKGS}"prevents word-splitting if the variable is empty or contains spaces, andprintf "%s"avoids trailing-newline artifacts fromecho(though both are functionally equivalent in this variable-assignment context). Control flow and package selection logic remain unchanged..github/workflows/test.yml (2)
119-137: Hadolint CI integration is correctly structured.The job follows standard patterns: checks out code, runs the action on target Dockerfiles, and runs in parallel with existing CI stages. The selective ignore of DL3033 for the daemon Dockerfile aligns with the conditional RUN logic added in this PR.
119-137: No action required. Dockerfile.webhook exists in the repository root and is properly referenced in the hadolint workflow. Files not modified in a PR do not appear in the PR review diff, so their absence from the file list does not indicate they don't exist.
add hadolint check action
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.