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: I7e3ca8fa9a48f3308dec46eda4ccf7e76d7b6338
This commit is contained in:
Nam Nguyen Hoai 2017-10-18 13:33:08 +07:00
parent 4e31fd30ba
commit 0f069cf9b6
3 changed files with 4 additions and 4 deletions

View File

@ -48,4 +48,4 @@ fi
# return error catching back # return error catching back
set -o errexit set -o errexit
sudo chown -R jenkins:jenkins "${dst}" sudo chown -R $USER:stack "${dst}"

View File

@ -19,7 +19,7 @@
function create_artifacts_dir() { function create_artifacts_dir() {
dst="${WORKSPACE}/artifacts" dst="${WORKSPACE}/artifacts"
mkdir -p "${dst}" mkdir -p "${dst}"
sudo chown -R jenkins:jenkins "${dst}" sudo chown -R $USER:stack "${dst}"
} }

View File

@ -19,7 +19,7 @@
function git_clone_devstack() { function git_clone_devstack() {
local DEVSTACK_BRANCH=${DEVSTACK_BRANCH:=master} local DEVSTACK_BRANCH=${DEVSTACK_BRANCH:=master}
sudo mkdir -p "${STACK_HOME}" sudo mkdir -p "${STACK_HOME}"
sudo chown -R jenkins:jenkins "${STACK_HOME}" sudo chown -R $USER:stack "${STACK_HOME}"
git clone https://github.com/openstack-dev/devstack "${STACK_HOME}/devstack" git clone https://github.com/openstack-dev/devstack "${STACK_HOME}/devstack"
pushd "${STACK_HOME}/devstack" pushd "${STACK_HOME}/devstack"
@ -37,7 +37,7 @@ function deploy_devstack() {
local git_dir=/opt/git local git_dir=/opt/git
sudo mkdir -p "${git_dir}/openstack" sudo mkdir -p "${git_dir}/openstack"
sudo chown -R jenkins:jenkins "${git_dir}/openstack" sudo chown -R $USER:stack "${git_dir}/openstack"
git clone https://github.com/openstack/murano "${git_dir}/openstack/murano" git clone https://github.com/openstack/murano "${git_dir}/openstack/murano"
if [ "${ZUUL_PROJECT}" == 'openstack/murano' ]; then if [ "${ZUUL_PROJECT}" == 'openstack/murano' ]; then