From 26cf64862c5a2356a589c6606ef6459b03952607 Mon Sep 17 00:00:00 2001 From: Raissa Sarmento Date: Fri, 13 Oct 2017 15:13:16 +0100 Subject: [PATCH] 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: Ib83267ef75f91fb8f95af312d644ebe19c6307c9 (cherry picked from commit d482b16ca31c79bb614a5d967511d7ec56e1723b) (cherry picked from commit 14b17ebd31efae8b886ba95786836949751a5c39) --- contrib/ci/common.sh | 4 ++-- contrib/ci/post_test_hook.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/ci/common.sh b/contrib/ci/common.sh index c1feb7156f..5e63b624cd 100755 --- a/contrib/ci/common.sh +++ b/contrib/ci/common.sh @@ -67,7 +67,7 @@ function archive_file { local filename=$1 sudo gzip -9 $filename - sudo chown jenkins:jenkins $filename.gz + sudo chown $USER:stack $filename.gz sudo chmod a+r $filename.gz } @@ -82,7 +82,7 @@ function save_tempest_results { # 1. Create destination directory sudo mkdir $dst_dirname - sudo chown jenkins:jenkins $dst_dirname + sudo chown $USER:stack $dst_dirname sudo chmod 755 $dst_dirname # 2. Save tempest configuration file diff --git a/contrib/ci/post_test_hook.sh b/contrib/ci/post_test_hook.sh index 11ef69aebc..a37662d91c 100755 --- a/contrib/ci/post_test_hook.sh +++ b/contrib/ci/post_test_hook.sh @@ -16,8 +16,8 @@ # First argument ($1) expects 'multibackend' as value for setting appropriate # tempest conf opts, all other values will assume singlebackend installation. -sudo chown -R jenkins:stack $BASE/new/tempest -sudo chown -R jenkins:stack $BASE/data/tempest +sudo chown -R $USER:stack $BASE/new/tempest +sudo chown -R $USER:stack $BASE/data/tempest sudo chmod -R o+rx $BASE/new/devstack/files # Import devstack functions 'iniset', 'iniget' and 'trueorfalse' @@ -319,7 +319,7 @@ for port in ${UDP_PORTS[*]}; do done echo "Running tempest manila test suites" -sudo -H -u jenkins tox -eall-plugin $MANILA_TESTS -- --concurrency=$MANILA_TEMPEST_CONCURRENCY +sudo -H -u $USER tox -eall-plugin $MANILA_TESTS -- --concurrency=$MANILA_TEMPEST_CONCURRENCY RETVAL=$? @@ -341,7 +341,7 @@ if [[ "$DRIVER" == "dummy" ]]; then manila type-key default set driver_handles_share_servers=False echo "Running tempest manila test suites for DHSS=False mode" - sudo -H -u jenkins tox -eall-plugin $MANILA_TESTS -- --concurrency=$MANILA_TEMPEST_CONCURRENCY + sudo -H -u $USER tox -eall-plugin $MANILA_TESTS -- --concurrency=$MANILA_TEMPEST_CONCURRENCY RETVAL2=$? save_tempest_results 2