Skip to content
Snippets Groups Projects
Commit a2bfa01e authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Fix environment setup for CI usage

parent 6d8ac050
No related branches found
No related tags found
1 merge request!74Fix environment setup for CI usage
...@@ -189,6 +189,15 @@ RUN find -L /usr/local/* \ ...@@ -189,6 +189,15 @@ RUN find -L /usr/local/* \
| grep 'x-executable\|x-archive\|x-sharedlib' \ | grep 'x-executable\|x-archive\|x-sharedlib' \
| awk -F: '{print $1}' | xargs strip -s | awk -F: '{print $1}' | xargs strip -s
## Bugfix to address issues loading the Qt5 libraries on Linux kernels prior to 3.15
## See
#https://askubuntu.com/questions/1034313/ubuntu-18-4-libqt5core-so-5-cannot-open-shared-object-file-no-such-file-or-dir
## and links therin for more info
RUN strip --remove-section=.note.ABI-tag /usr/local/lib/libQt5Core.so
COPY eic-shell /usr/local/bin/eic-shell
COPY entrypoint.sh /usr/local/sbin/entrypoint.sh
## ======================================================================================== ## ========================================================================================
## STAGE 3 ## STAGE 3
## Lean target image ## Lean target image
...@@ -211,16 +220,9 @@ RUN --mount=from=staging,target=/staging \ ...@@ -211,16 +220,9 @@ RUN --mount=from=staging,target=/staging \
&& cat /etc/profile.d/z11_jug_env.sh >> /etc/eic-env.sh \ && cat /etc/profile.d/z11_jug_env.sh >> /etc/eic-env.sh \
&& cp /etc/eic-env.sh /etc/profile.d/z10_eic-env.sh && cp /etc/eic-env.sh /etc/profile.d/z10_eic-env.sh
## Bugfix to address issues loading the Qt5 libraries on Linux kernels prior to 3.15
## See
#https://askubuntu.com/questions/1034313/ubuntu-18-4-libqt5core-so-5-cannot-open-shared-object-file-no-such-file-or-dir
## and links therin for more info
RUN strip --remove-section=.note.ABI-tag /usr/local/lib/libQt5Core.so
COPY eic-shell /usr/local/bin/eic-shell
## make sure we have the entrypoints setup correctly ## make sure we have the entrypoints setup correctly
ENTRYPOINT [] ENTRYPOINT ["/usr/local/sbin/entrypoint.sh"]
CMD ["bash", "--rcfile", "/etc/profile", "-l"] CMD ["bash", "--rcfile", "/etc/profile", "-l"]
USER 0 USER 0
WORKDIR / WORKDIR /
......
#! /usr/bin/env bash #!/usr/bin/env bash
source /etc/profile source /etc/profile
## Force environment to be clean ## Force environment to be clean
source /etc/eic-env.sh source /etc/eic-env.sh
piped_args=()
if [ -p /dev/stdin ]; then if [ -p /dev/stdin ]; then
# If we want to read the input line by line # If we want to read the input line by line
while IFS= read line; do while IFS= read line; do
if [ -z "$piped_args" ]; then piped_args+=("${line}")
piped_args="${line}"
else
piped_args="${piped_args}\n${line}"
fi
done done
fi fi
## Fire off bash ### Fire off bash
if [ ${piped_args} ] ; then if [ "${#piped_args[@]}" != "0" ]; then
echo -e ${piped_args} | exec bash echo "${#piped_args[@]}"
printf "%s\n" "${piped_args[@]}" | bash
elif [ $# -gt 0 ]; then elif [ $# -gt 0 ]; then
exec bash -c "$@" exec bash -c "$@"
else else
......
#!/usr/bin/env bash
source /etc/profile
## Force environment to be clean
source /etc/eic-env.sh
exec "$@"
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
function print_the_help { function print_the_help {
echo "USAGE: -u user -p -password [...] [registry]" echo "USAGE: -u user -p -password [...] [registry]"
echo "ARGUMENTS:" echo "ARGUMENTS:"
echo " -u,--user Input image name (e.g., eic_base)" echo " -u,--user Registry user"
echo " -p,--password Input tag (eg., v3.0.0)" echo " -p,--password Registry password"
echo " --ci Login to internal CI registry; -u, -p and positional are ignored" echo " --ci Login to internal CI registry; -u, -p and positional are ignored"
echo " -t,--time Time interval (in seconds) between attempts" echo " -t,--time Time interval (in seconds) between attempts"
echo " (doubled each time), default: 5" echo " (doubled each time), default: 5"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment