[None][infra] Add support to run NGC container scanning in pre-merge#15602
[None][infra] Add support to run NGC container scanning in pre-merge#15602yuanjingx87 wants to merge 2 commits into
Conversation
Signed-off-by: Yuanjing Xue <197832395+yuanjingx87@users.noreply.github.com>
📝 WalkthroughWalkthroughThe Jenkins Docker image pipeline adds three boolean parameters to control whether internal release, CI image, and NGC release stage groups run. ChangesSelective Docker image stage execution
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
jenkins/BuildDockerImage.groovy (1)
487-496: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReduce stage-key duplication to avoid silent drift.
The same stage names are hardcoded in both
buildConfigskeys andenabledStagespopulation. Centralizing these key lists avoids breakage when a display name changes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@jenkins/BuildDockerImage.groovy` around lines 487 - 496, The stage name lists are duplicated between the build config keys and the enabledStages population, which can drift if a display name changes. Update the logic in BuildDockerImage.groovy around enabledStages to derive these values from a single shared source used by buildConfigs and the params checks, so the names stay consistent. Refer to the existing buildInternalRelease, buildCiImage, and buildNgcRelease stage groupings when centralizing the stage-key list.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@jenkins/BuildDockerImage.groovy`:
- Around line 487-499: Guard against empty stage selection in
BuildDockerImage.groovy by checking the filtered buildConfigs right after the
enabledStages selection logic and before pipeline.parallel is invoked in the
buildJobs flow. If buildConfigs is empty because buildInternalRelease,
buildCiImage, and buildNgcRelease are all false, fail fast with a clear error
message instead of calling parallel with no branches. Use the existing
buildConfigs and buildJobs/pipeline.parallel path to place the check so both
affected call sites are protected.
---
Nitpick comments:
In `@jenkins/BuildDockerImage.groovy`:
- Around line 487-496: The stage name lists are duplicated between the build
config keys and the enabledStages population, which can drift if a display name
changes. Update the logic in BuildDockerImage.groovy around enabledStages to
derive these values from a single shared source used by buildConfigs and the
params checks, so the names stay consistent. Refer to the existing
buildInternalRelease, buildCiImage, and buildNgcRelease stage groupings when
centralizing the stage-key list.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: ecd2b6a0-eb03-4839-af6f-c9a7b53fd3d8
📒 Files selected for processing (1)
jenkins/BuildDockerImage.groovy
|
/bot run --stage-list="NGC-Container-Scaning" |
|
PR_Github #55603 [ run ] triggered by Bot. Commit: |
|
PR_Github #55603 [ run ] completed with state
|
48cbca5 to
ed4ee7b
Compare
|
/bot run --stage-list="NGC-Container-Scaning" |
|
PR_Github #55608 [ run ] triggered by Bot. Commit: |
Signed-off-by: Yuanjing Xue <197832395+yuanjingx87@users.noreply.github.com>
ed4ee7b to
6d71d88
Compare
|
/bot run --stage-list="NGC-Container-Scaning" |
|
PR_Github #55608 [ run ] completed with state
|
|
PR_Github #55609 [ run ] triggered by Bot. Commit: |
|
PR_Github #55609 [ run ] completed with state
|
Summary by CodeRabbit
New Features
Bug Fixes
Description
Allow generating ngc container in pre-merge and get it scanning through PLC scannning pipeline
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.