diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 46b110943c9bec689fbe5693fe813115a1c58eb5..a660cf08027b30e203f056274f4db4f7ba208159 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,9 +49,9 @@ trigger_prepare: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - touch /root/.Xauthority # Hack BASH_SOURCE into sourced files, docker its sh shell won't set this - - export BASH_SOURCE=$(pwd)/bootstrap/etc/lofar20rc.sh + - export BASH_SOURCE=$(pwd)/setup.sh # source the lofarrc file and mask its non zero exit code - - . bootstrap/etc/lofar20rc.sh || true + - . setup.sh || true ## Allow docker image script to execute # - chmod u+x $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh @@ -661,11 +661,11 @@ integration_test_docker: script: - touch /root/.Xauthority # Hack BASH_SOURCE into sourced files, docker its sh shell won't set this - - export BASH_SOURCE=$(pwd)/bootstrap/etc/lofar20rc.sh + - export BASH_SOURCE=$(pwd)/setup.sh # Hack HOSTNAME env variable into host.docker.internal, set in docker-compose - export HOSTNAME=host.docker.internal # source the lofarrc file and mask its non zero exit code - - . bootstrap/etc/lofar20rc.sh || true + - . setup.sh || true # TANGO_HOST must be unset our databaseds will be unreachable - unset TANGO_HOST # Do not remove 'bash' or statement will be ignored by primitive docker shell diff --git a/sbin/tag_and_push_docker_image.sh b/sbin/tag_and_push_docker_image.sh index 934681d216b3f5f67142dec1b37e03cb5a06fb97..fe20f1779dfc8a79fe240d47ecb5cd330afdb893 100755 --- a/sbin/tag_and_push_docker_image.sh +++ b/sbin/tag_and_push_docker_image.sh @@ -43,7 +43,7 @@ while getopts ${optstring} arg; do done if [ -z "${LOFAR20_DIR+x}" ]; then - echo "LOFAR20_DIR not set, did you forget to source lofar20rc.sh?" + echo "LOFAR20_DIR not set, did you forget to source setup.sh?" exit 1 fi diff --git a/setup.sh b/setup.sh index 17e98b131375011a62159fe49d737bc250daab41..23a98f323d7d01a18b7f341dc763eb1490095dab 100644 --- a/setup.sh +++ b/setup.sh @@ -13,7 +13,7 @@ # then be used as LOFAR20_DIR. Otherwise this file's directory # be used to determine the tango directory location. ABSOLUTE_PATH=$(realpath $(dirname ${BASH_SOURCE})) -export LOFAR20_DIR=${1:-$(realpath ${ABSOLUTE_PATH}/../..)} +export LOFAR20_DIR=${1:-${ABSOLUTE_PATH}} if [ ! -f "${LOFAR20_DIR}/.git/hooks/post-checkout" ]; then alias git="cp ${LOFAR20_DIR}/bin/update_submodules.sh ${LOFAR20_DIR}/.git/hooks/post-checkout; cp ${LOFAR20_DIR}/bin/update_submodules.sh ${LOFAR20_DIR}/.git/hooks/post-merge; unalias git; git"