From: Vladimir Khlyunev Date: Mon, 11 Apr 2022 10:06:33 +0000 (+0400) Subject: Handle result files permissions correctly X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=303d1a6d99601fd43a5e07819fc584911f53ec33;p=tools%2Fsustaining.git Handle result files permissions correctly Change-Id: I291ec351fe722d87749c92292f0c4e47afc882e2 --- diff --git a/maintenance-ci/mos/rally-docker/run_rally_tempest.sh b/maintenance-ci/mos/rally-docker/run_rally_tempest.sh index 01b6f74..31bc277 100644 --- a/maintenance-ci/mos/rally-docker/run_rally_tempest.sh +++ b/maintenance-ci/mos/rally-docker/run_rally_tempest.sh @@ -103,10 +103,18 @@ cp "$(find / -name tempest.log)" /root/rally/tempest.log git clone https://github.com/EduardFazliev/rally_json2junit python rally_json2junit/rally_json2junit/results_parser.py output.json +USER_ID=$(ls -nd /root/shared/id_rsa | awk '{print $3}') +GROUP_ID=$(ls -nd /root/shared/id_rsa | awk '{print $4}') + +chown -hR ${USER_ID}:${GROUP_ID} /root/rally/tempest.conf +chown -hR ${USER_ID}:${GROUP_ID} /root/rally/log.log +chown -hR ${USER_ID}:${GROUP_ID} /root/output.json +chown -hR ${USER_ID}:${GROUP_ID} /root/verification.xml + mkdir -p /root/shared/results -chmod 777 /root/shared/results cp /root/rally/log.log /root/shared/results/ cp /root/rally/tempest.log /root/shared/results/ -cp "$(find / -name verification.xml)" /root/rally/results -cp "$(find / -name output.json)" /root/shared/results/ -chmod -R +w /root/shared \ No newline at end of file +cp /root/verification.xml /root/shared/results/ +cp /root/output.json /root/shared/results/ + +chown -hR ${USER_ID}:${GROUP_ID} /root/shared \ No newline at end of file diff --git a/maintenance-ci/mos/scripts/maintenance-tempest-runner.sh b/maintenance-ci/mos/scripts/maintenance-tempest-runner.sh index c217cfa..b07b1f7 100644 --- a/maintenance-ci/mos/scripts/maintenance-tempest-runner.sh +++ b/maintenance-ci/mos/scripts/maintenance-tempest-runner.sh @@ -37,8 +37,6 @@ wait_up_env() { if [ -f "${REPORT_PREFIX}/verification.xml" ]; then mv -f "${REPORT_PREFIX}/verification.xml" "${REPORT_PREFIX}/verification.xml.unreported" fi -rm -rf log.log verification.xml tempest.log tempest.conf - source "${VENV_PATH}/bin/activate" # retry 3 times, because dos.py is not stable sometimes (ntp problem)