Skip to content

Commit 966d919

Browse files
adrianreberclaude
andcommitted
feat: add --to-disk option for provisioning compute node image to disk
Add new long option --to-disk to run-ci.sh that enables disk-based provisioning of compute node images. When specified, the option sets enable_todisk=1 in the vars file for use by downstream provisioning scripts. Changes: - Add --to-disk long option to getopt parsing - Add case handler for the new option - Update help text with option description - Export enable_todisk=1 to vars file when option is used 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Adrian Reber <areber@redhat.com>
1 parent 413cd00 commit 966d919

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ansible/roles/test/files/run-ci.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ show_usage() {
2424
echo " -o, --overwrite-rpm <RPM> Use this RPM to overwrite the default docs-ohpc RPM"
2525
echo " -b, --infiniband Use InfiniBand"
2626
echo " -n, --no-upload Don't upload test results"
27+
echo " --to-disk Provision compute node image to disk"
2728
echo " -h, --help Show this help"
2829
}
2930

3031
TIMEOUT="100"
3132

3233
# Parse command line options using external getopt
33-
if ! PARSED=$(getopt -o d:v:r:m:p:ig:nbo:h --long distribution:,version:,repository:,rms:,provisioner:,intel,gpu:,no-upload,infiniband,overwrite-rpm:,help -n "$0" -- "$@"); then
34+
if ! PARSED=$(getopt -o d:v:r:m:p:ig:nbo:h --long distribution:,version:,repository:,rms:,provisioner:,intel,gpu:,no-upload,infiniband,overwrite-rpm:,to-disk,help -n "$0" -- "$@"); then
3435
echo "Failed to parse options"
3536
show_usage
3637
exit 1
@@ -84,6 +85,10 @@ while true; do
8485
((TIMEOUT += 50))
8586
shift 2
8687
;;
88+
--to-disk)
89+
ENABLE_TODISK="true"
90+
shift
91+
;;
8792
-h | --help)
8893
show_usage
8994
exit 0
@@ -442,6 +447,10 @@ if [[ "${WITH_GPU}" == "nvidia" ]]; then
442447
echo "export enable_nvidia_gpu_driver=1" >>"${VARS}"
443448
fi
444449

450+
if [ -n "${ENABLE_TODISK}" ]; then
451+
echo "export enable_todisk=1" >>"${VARS}"
452+
fi
453+
445454
scp "${VARS}" "${SMS}":/root/vars
446455
scp /root/.bash_history "${SMS}":
447456

0 commit comments

Comments
 (0)