From cae3e206e0c35cb3c642f8d956a1989fa331fc5c Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 3 Apr 2023 16:59:47 +0200 Subject: [PATCH] Fix dstat run in gates With previous commit [1] a condition was introduced on when to run dstat. Though, ZUUL_PROJECT env variable used is defined only in post jobs, while dstat should be started in pre-jobs and then collected with logs. So we adjust condition to start up dstat in gates at the first place. [1] https://opendev.org/openstack/openstack-ansible/commit/0369605a1c560981fbcf4171f0c9e195502fcfe9 Change-Id: I7fd4a846360847496b1db7b505b35b9eff57ebbe --- scripts/scripts-library.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/scripts-library.sh b/scripts/scripts-library.sh index d5a790880b..9dbdd80577 100755 --- a/scripts/scripts-library.sh +++ b/scripts/scripts-library.sh @@ -29,10 +29,10 @@ GATE_EXIT_LOG_COPY="${GATE_EXIT_LOG_COPY:-false}" GATE_EXIT_LOG_GZIP="${GATE_EXIT_LOG_GZIP:-true}" GATE_EXIT_RUN_ARA="${GATE_EXIT_RUN_ARA:-true}" -if [ -z ${ZUUL_PROJECT} ]; then - GATE_EXIT_RUN_DSTAT="${GATE_EXIT_RUN_DSTAT:-false}" -else +if [ -v ZUUL_PROJECT ] || [ -v ZUUL_SRC_PATH ]; then GATE_EXIT_RUN_DSTAT="${GATE_EXIT_RUN_DSTAT:-true}" +else + GATE_EXIT_RUN_DSTAT="${GATE_EXIT_RUN_DSTAT:-false}" fi # The default SSHD configuration has MaxSessions = 10. If a deployer changes