Skip to content
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

Add the option to pass a command to the inspect script, which will get executed in the container #66

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions bot/inspect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ display_help() {
echo " to be something like JOB_DIR/previous_tmp/{build,tarball}_step/TARBALL.tgz"
echo " and thus determine JOB_DIR from the given path"
echo " [default: none]"
echo " -c | --command COMMAND - command to execute inside the container, in the prefix environment"
echo " -x | --http-proxy URL - provides URL for the environment variable http_proxy"
echo " -y | --https-proxy URL - provides URL for the environment variable https_proxy"
}
Expand Down Expand Up @@ -62,6 +63,10 @@ while [[ $# -gt 0 ]]; do
export https_proxy="${2}"
shift 2
;;
-c|--command)
export run_in_prefix="${2}"
shift 2
;;
-*|--*)
echo "Error: Unknown option: ${1}" >&2
exit 1
Expand Down Expand Up @@ -421,10 +426,16 @@ echo "Executing command to start interactive session to inspect build job:"
# - setup steps run in 'EESSI-pilot-install-software.sh'
# These initializations are combined into a single script that is executed when
# the shell in startprefix is started. We set the env variable BASH_ENV here.
echo "./eessi_container.sh ${CMDLINE_ARGS[@]}"
echo " -- ${EESSI_COMPAT_LAYER_DIR}/startprefix"
./eessi_container.sh "${CMDLINE_ARGS[@]}" \
if [[ -z ${run_in_prefix} ]]; then
echo "./eessi_container.sh ${CMDLINE_ARGS[@]}"
echo " -- ${EESSI_COMPAT_LAYER_DIR}/startprefix"
./eessi_container.sh "${CMDLINE_ARGS[@]}" \
-- ${EESSI_COMPAT_LAYER_DIR}/startprefix

else
echo "./eessi_container.sh ${CMDLINE_ARGS[@]}"
echo " -- ${EESSI_COMPAT_LAYER_DIR}/startprefix <<< ${run_in_prefix}"
./eessi_container.sh "${CMDLINE_ARGS[@]}" \
-- ${EESSI_COMPAT_LAYER_DIR}/startprefix <<< ${run_in_prefix}
fi

exit 0