From d482b16ca31c79bb614a5d967511d7ec56e1723b 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 --- 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 e6e22b7d5f..09481a1ac2 100755 --- a/contrib/ci/common.sh +++ b/contrib/ci/common.sh @@ -65,7 +65,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 } @@ -80,7 +80,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 043ea5822c..02a2e06612 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' @@ -329,7 +329,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=$? @@ -351,7 +351,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