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: I7bd4c3d5a0acc2c73557a65dcc274a97f16bfd07
This commit is contained in:
		| @@ -24,14 +24,14 @@ function generate_testr_results { | |||||||
|         sudo /usr/os-testr-env/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html |         sudo /usr/os-testr-env/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html | ||||||
|         sudo gzip -9 $BASE/logs/testrepository.subunit |         sudo gzip -9 $BASE/logs/testrepository.subunit | ||||||
|         sudo gzip -9 $BASE/logs/testr_results.html |         sudo gzip -9 $BASE/logs/testr_results.html | ||||||
|         sudo chown jenkins:jenkins $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz |         sudo chown $USER:$USER $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz | ||||||
|         sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz |         sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz | ||||||
|     fi |     fi | ||||||
| } | } | ||||||
|  |  | ||||||
| export CINDERCLIENT_DIR="$BASE/new/python-cinderclient" | export CINDERCLIENT_DIR="$BASE/new/python-cinderclient" | ||||||
|  |  | ||||||
| sudo chown -R jenkins:stack $CINDERCLIENT_DIR | sudo chown -R $USER:stack $CINDERCLIENT_DIR | ||||||
|  |  | ||||||
| # Get admin credentials | # Get admin credentials | ||||||
| cd $STACK_DIR | cd $STACK_DIR | ||||||
| @@ -44,7 +44,7 @@ cd $CINDERCLIENT_DIR | |||||||
| echo "Running cinderclient functional test suite" | echo "Running cinderclient functional test suite" | ||||||
| set +e | set +e | ||||||
| # Preserve env for OS_ credentials | # Preserve env for OS_ credentials | ||||||
| sudo -E -H -u jenkins tox -efunctional | sudo -E -H -u $USER tox -efunctional | ||||||
| EXIT_CODE=$? | EXIT_CODE=$? | ||||||
| set -e | set -e | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Nam Nguyen Hoai
					Nam Nguyen Hoai