summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDai Dang Van <daidv@vn.fujitsu.com>2017-10-17 14:07:16 +0700
committerDai Dang Van <daidv@vn.fujitsu.com>2017-10-17 14:12:19 +0700
commit9d3d86e5e0208e5949ea0c4d7f25e0a08c7d03c4 (patch)
tree5a578c0f97791b648f11199035844788296f1e96
parent3e71528e9ca0ee25dbef0cd7c40028e70b46aaca (diff)
Use generic user for both zuul v2 and v3
Zuul v2 uses 'jenkins' as user, but Zuul v3 uses 'zuul'. Using $USER solves it for both cases. Change-Id: I872aae3c3b0a739687be199c5c1858957f9cd3b0
Notes
Notes (review): Code-Review+2: zhurong <aaronzhu1121@gmail.com> Workflow+1: zhurong <aaronzhu1121@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 24 Oct 2017 08:32:24 +0000 Reviewed-on: https://review.openstack.org/512518 Project: openstack/python-muranoclient Branch: refs/heads/master
-rwxr-xr-xmuranoclient/tests/functional/hooks/post_test_hook.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/muranoclient/tests/functional/hooks/post_test_hook.sh b/muranoclient/tests/functional/hooks/post_test_hook.sh
index b38e948..7a7f365 100755
--- a/muranoclient/tests/functional/hooks/post_test_hook.sh
+++ b/muranoclient/tests/functional/hooks/post_test_hook.sh
@@ -21,14 +21,14 @@ function generate_testr_results {
21 sudo /usr/os-testr-env/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html 21 sudo /usr/os-testr-env/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html
22 sudo gzip -9 $BASE/logs/testrepository.subunit 22 sudo gzip -9 $BASE/logs/testrepository.subunit
23 sudo gzip -9 $BASE/logs/testr_results.html 23 sudo gzip -9 $BASE/logs/testr_results.html
24 sudo chown jenkins:jenkins $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz 24 sudo chown $USER:$USER $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
25 sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz 25 sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
26 fi 26 fi
27} 27}
28 28
29export MURANOCLIENT_DIR="$BASE/new/python-muranoclient" 29export MURANOCLIENT_DIR="$BASE/new/python-muranoclient"
30 30
31sudo chown -R jenkins:stack $MURANOCLIENT_DIR 31sudo chown -R $USER:stack $MURANOCLIENT_DIR
32 32
33# Get admin credentials 33# Get admin credentials
34cd $BASE/new/devstack 34cd $BASE/new/devstack
@@ -51,13 +51,13 @@ EOF
51# Go to the muranoclient dir 51# Go to the muranoclient dir
52cd $MURANOCLIENT_DIR 52cd $MURANOCLIENT_DIR
53 53
54sudo chown -R jenkins:stack $MURANOCLIENT_DIR 54sudo chown -R $USER:stack $MURANOCLIENT_DIR
55 55
56# Run tests 56# Run tests
57echo "Running muranoclient functional test suite" 57echo "Running muranoclient functional test suite"
58set +e 58set +e
59# Preserve env for OS_ credentials 59# Preserve env for OS_ credentials
60sudo -E -H -u jenkins tox -efunctional 60sudo -E -H -u $USER tox -efunctional
61EXIT_CODE=$? 61EXIT_CODE=$?
62set -e 62set -e
63 63