Add support for coping <version>/*.md files to / container#422
Add support for coping <version>/*.md files to / container#422
Conversation
|
[test] |
📝 WalkthroughWalkthroughAdds Make targets to copy and remove per-version Markdown files into each version's Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
|
During the our weekly call, we have discovered that container misses /root/help.1 file and readmes are not present as well. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
common.mk (1)
85-86: Missing.PHONYdeclaration forcopy_md_filestarget.The
copy_md_filestarget should be declared as.PHONYto ensure it always runs regardless of whether a file with that name exists. This is consistent with how other non-file-producing targets in this Makefile are declared.♻️ Proposed fix
Add
copy_md_filesto an existing.PHONYdeclaration or create a new one before the target:+.PHONY: copy_md_files # Copy also all .md files from version directory to the root of # container images, so that they are available in the image # Currently there is only README.md, but there may be more in the future copy_md_files:Also applies to: 142-146
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@common.mk` around lines 85 - 86, Add a .PHONY declaration for the copy_md_files target so it always runs (e.g., include copy_md_files in the existing .PHONY list or add a new `.PHONY: copy_md_files` near the top); update the Makefile so the copy_md_files target (referenced by the rule for $(VERSIONS)) is declared phony to avoid skipping when a file named copy_md_files exists.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@common.mk`:
- Around line 142-146: The copy_md_files Makefile rule is copying from the
project root (cp -v *.md) instead of from each version directory and will fail
if no .md files exist; update the loop in the copy_md_files target to cp from
the version directory (use cp -v "$$version"/*.md "$$version"/root/) and guard
the copy with a existence check such as ls "$$version"/*.md >/dev/null 2>&1 &&
cp -v "$$version"/*.md "$$version"/root/ so the command only runs when files
exist (refer to the copy_md_files target and the $$version variable in the
diff).
---
Nitpick comments:
In `@common.mk`:
- Around line 85-86: Add a .PHONY declaration for the copy_md_files target so it
always runs (e.g., include copy_md_files in the existing .PHONY list or add a
new `.PHONY: copy_md_files` near the top); update the Makefile so the
copy_md_files target (referenced by the rule for $(VERSIONS)) is declared phony
to avoid skipping when a file named copy_md_files exists.
Pull Request validationFailed🔴 Review - Missing review from a member (1 required) Success🟢 CI - All checks have passed |
to <version>/root directory. After sync to GitLab we have MD files present in each image. Relevant issue https://redhat.atlassian.net/browse/RHELMISC-27557 Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
|
[test] |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
common.mk (1)
142-148: Add.PHONYdeclaration forcopy_md_files.The target produces no output file, so it should be declared
.PHONYto match other similar targets in this file (e.g.,build,test,clean). This ensures Make always runs it regardless of filesystem state.♻️ Proposed fix
+.PHONY: copy_md_files copy_md_files: `@for` version in $(VERSIONS); do \🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@common.mk` around lines 142 - 148, Add a .PHONY declaration for the Make target copy_md_files so Make always runs it (like the existing .PHONY list for build/test/clean); update the .PHONY line(s) to include copy_md_files (referencing the target name copy_md_files) rather than leaving it as a file-dependent target.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@common.mk`:
- Around line 142-148: Add a .PHONY declaration for the Make target
copy_md_files so Make always runs it (like the existing .PHONY list for
build/test/clean); update the .PHONY line(s) to include copy_md_files
(referencing the target name copy_md_files) rather than leaving it as a
file-dependent target.
Testing Farm results
|
pkhartsk
left a comment
There was a problem hiding this comment.
Works for me when building postgresql-container locally
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
|
[test] |
|
@pkubatrh Added MD files removal. As soon as You are fine with it please Approve. |
deploying sclorg/container-common-scripts#422 The next step will be sync to GitLab repo and see, whether README.md file will be present in GitLab repo in `root` directory Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
deploying sclorg/container-common-scripts#422 The next step will be sync to GitLab repo and see, whether README.md file will be present in GitLab repo in `root` directory Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Deliver fix for copying version during the tests sclorg/container-common-scripts#422 This is needed to have MD files in downstream GitLab repos Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Add support for coping /*.md files
to /root directory.
After sync to GitLab we have MD files present
in each image.
Relevant issue https://redhat.atlassian.net/browse/RHELMISC-27557
The output looks like, in case in directory are more MD files:
Summary by CodeRabbit