chore(run.sh): fix permissions on secrets directory

This commit is contained in:
Ivan Dyachkov 2023-03-09 09:12:46 +01:00 committed by Thales Macedo Garitezi
parent 5eaaa83b82
commit 2fe341d152
1 changed files with 14 additions and 0 deletions

View File

@ -185,11 +185,25 @@ if [[ -t 1 ]]; then
TTY='-t' TTY='-t'
fi fi
# ensure directory with secrets is created by current user before running compose
mkdir -p /tmp/emqx-ci/emqx-shared-secret
if [ "$STOP" = 'no' ]; then if [ "$STOP" = 'no' ]; then
# some left-over log file has to be deleted before a new docker-compose up # some left-over log file has to be deleted before a new docker-compose up
rm -f '.ci/docker-compose-file/redis/*.log' rm -f '.ci/docker-compose-file/redis/*.log'
set +e
# shellcheck disable=2086 # no quotes for F_OPTIONS # shellcheck disable=2086 # no quotes for F_OPTIONS
$DC $F_OPTIONS up -d --build --remove-orphans $DC $F_OPTIONS up -d --build --remove-orphans
RESULT=$?
if [ $RESULT -ne 0 ]; then
mkdir -p _build/test/logs
LOG='_build/test/logs/docker-compose.log'
echo "Dumping docker-compose log to $LOG"
# shellcheck disable=2086 # no quotes for F_OPTIONS
$DC $F_OPTIONS logs --no-color --timestamps > "$LOG"
exit 1
fi
set -e
fi fi
# rebar and hex cache directory need to be writable by $DOCKER_USER # rebar and hex cache directory need to be writable by $DOCKER_USER