diff --git a/bin/dump_ConfigDb.sh b/bin/dump_ConfigDb.sh index 810a644f903c4755481027c2d2959c0740d75f05..0dc634c458b76cd5d3c13e2d7dab6e905f66248a 100755 --- a/bin/dump_ConfigDb.sh +++ b/bin/dump_ConfigDb.sh @@ -1,4 +1,4 @@ #!/bin/bash # writes the JSON dump to stdout, Do not change -i into -it incompatible with gitlab ci! -docker exec -i "${CONTAINER_NAME_PREFIX}"dsconfig python -m dsconfig.dump > "${1}" +docker exec -i "${CONTAINER_NAME_PREFIX}"dsconfig python -m dsconfig. diff --git a/bootstrap/etc/lofar20rc.sh b/bootstrap/etc/lofar20rc.sh index 7f1d361e53f971866eb4e86c57ee40f1f2125f84..6e4a5c9bc8d6a78c1b61cca02159ee01291d3805 100755 --- a/bootstrap/etc/lofar20rc.sh +++ b/bootstrap/etc/lofar20rc.sh @@ -9,7 +9,6 @@ # Pass a directory as first parameter to this script. This will # 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}/../..)} @@ -25,14 +24,6 @@ else unset CONTAINER_NAME_PREFIX fi -# This needs to be modified for a development environment. -# Example: ~/lofar2.0/tango -# The current setting is for a production environment. -export TANGO_LOFAR_LOCAL_DIR=${LOFAR20_DIR}/ - -export TANGO_LOFAR_CONTAINER_DIR=/opt/lofar2.0/tango/ -export TANGO_LOFAR_CONTAINER_MOUNT=${TANGO_LOFAR_LOCAL_DIR}:${TANGO_LOFAR_CONTAINER_DIR}:rw - # This needs to be modified for a development environment. # In case you run multiple Docker networks on the same host in parallel, you need to specify a unique # network name for each of them. diff --git a/sbin/load_ConfigDb.sh b/sbin/load_ConfigDb.sh index 4706aa2c942bff74edae85c2eb7d5920b17dc473..1255f1ea141a75940f2cd858dfc2b40818bd6ec2 100755 --- a/sbin/load_ConfigDb.sh +++ b/sbin/load_ConfigDb.sh @@ -9,10 +9,10 @@ fi # copy file into container to read it from container, as the file's location # in the container won't be the same as on the host. -docker cp "${file}" dsconfig:/tmp/dsconfig-load-settings.json || exit 1 +docker cp "${file}" "${CONTAINER_NAME_PREFIX}"dsconfig:/tmp/dsconfig-update-settings.json || exit 1 -# write settings -docker exec -it "${TANGO_CONTAINER_ENV}" "${CONTAINER_NAME_PREFIX}"dsconfig json2tango --write "${file}" +# update settings, Do not change -i into -it this will break integration tests in gitlab ci! +docker exec -i "${CONTAINER_NAME_PREFIX}"dsconfig json2tango --write --update /tmp/dsconfig-update-settings.json # somehow json2tango does not return 0 on success exit 0 diff --git a/sbin/run_integration_test.sh b/sbin/run_integration_test.sh index 4327413d042b1b9605b3623fb786df676c002f04..e4e22e0d7e037a0e7c6c117dcff96e24e62d4246 100755 --- a/sbin/run_integration_test.sh +++ b/sbin/run_integration_test.sh @@ -18,7 +18,7 @@ make start databaseds dsconfig elk sleep 60 # Update the dsconfig -# Do not remove `bash`, otherwise statement ignored by gitlab ci! +# Do not remove `bash`, otherwise statement ignored by gitlab ci shell! bash "${LOFAR20_DIR}"/sbin/update_ConfigDb.sh "${LOFAR20_DIR}"/CDB/integration_ConfigDb.json cd "$LOFAR20_DIR/docker-compose" || exit 1