Browse Source

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 d482b16ca3)
(cherry picked from commit 14b17ebd31)
Raissa Sarmento 1 year ago
parent
commit
26cf64862c
2 changed files with 6 additions and 6 deletions
  1. 2
    2
      contrib/ci/common.sh
  2. 4
    4
      contrib/ci/post_test_hook.sh

+ 2
- 2
contrib/ci/common.sh View File

@@ -67,7 +67,7 @@ function archive_file {
67 67
     local filename=$1
68 68
 
69 69
     sudo gzip -9 $filename
70
-    sudo chown jenkins:jenkins $filename.gz
70
+    sudo chown $USER:stack $filename.gz
71 71
     sudo chmod a+r $filename.gz
72 72
 }
73 73
 
@@ -82,7 +82,7 @@ function save_tempest_results {
82 82
 
83 83
     # 1. Create destination directory
84 84
     sudo mkdir $dst_dirname
85
-    sudo chown jenkins:jenkins $dst_dirname
85
+    sudo chown $USER:stack $dst_dirname
86 86
     sudo chmod 755 $dst_dirname
87 87
 
88 88
     # 2. Save tempest configuration file

+ 4
- 4
contrib/ci/post_test_hook.sh View File

@@ -16,8 +16,8 @@
16 16
 # First argument ($1) expects 'multibackend' as value for setting appropriate
17 17
 # tempest conf opts, all other values will assume singlebackend installation.
18 18
 
19
-sudo chown -R jenkins:stack $BASE/new/tempest
20
-sudo chown -R jenkins:stack $BASE/data/tempest
19
+sudo chown -R $USER:stack $BASE/new/tempest
20
+sudo chown -R $USER:stack $BASE/data/tempest
21 21
 sudo chmod -R o+rx $BASE/new/devstack/files
22 22
 
23 23
 # Import devstack functions 'iniset', 'iniget' and 'trueorfalse'
@@ -319,7 +319,7 @@ for port in ${UDP_PORTS[*]}; do
319 319
 done
320 320
 
321 321
 echo "Running tempest manila test suites"
322
-sudo -H -u jenkins tox -eall-plugin $MANILA_TESTS -- --concurrency=$MANILA_TEMPEST_CONCURRENCY
322
+sudo -H -u $USER tox -eall-plugin $MANILA_TESTS -- --concurrency=$MANILA_TEMPEST_CONCURRENCY
323 323
 RETVAL=$?
324 324
 
325 325
 
@@ -341,7 +341,7 @@ if [[ "$DRIVER" == "dummy" ]]; then
341 341
     manila type-key default set driver_handles_share_servers=False
342 342
 
343 343
     echo "Running tempest manila test suites for DHSS=False mode"
344
-    sudo -H -u jenkins tox -eall-plugin $MANILA_TESTS -- --concurrency=$MANILA_TEMPEST_CONCURRENCY
344
+    sudo -H -u $USER tox -eall-plugin $MANILA_TESTS -- --concurrency=$MANILA_TEMPEST_CONCURRENCY
345 345
     RETVAL2=$?
346 346
     save_tempest_results 2
347 347
 

Loading…
Cancel
Save