Remove global privilege escalation for deploy_aio.sh
At the moment, deploy_aio.sh is called with sudo which results in the environment being wiped. This means that all Zuul environment variables are removed and therefore when zuul-cloner runs to checkout the branch of kolla-ansible, it will always fallback to master as ZUUL_BRANCH is unset. This patch removes the global usage of sudo in the tox.ini file as there is existing usage of sudo in the bash script itself. This will mean that we will only escalate privileges when needed rather for the whole script and the environment variables should be passed on properly resulting in the matching release of kolla-ansible being checked out. Closes-Bug: #1673756 Change-Id: I477a843e696be7136c020be6408afea01967879d (cherry picked from commit 4c7a4099ca017512fdfdbd28ac47724abf900d09)
This commit is contained in:
parent
82eb7461a3
commit
8156551e04
@ -24,5 +24,5 @@ pushd "${KOLLA_ANSIBLE_DIR}"
|
||||
sudo cp -a etc/kolla /etc/
|
||||
# Generate passwords
|
||||
sudo tools/generate_passwords.py
|
||||
./tools/deploy_aio.sh "$KOLLA_BASE" "$KOLLA_TYPE"
|
||||
sudo ./tools/deploy_aio.sh "$KOLLA_BASE" "$KOLLA_TYPE"
|
||||
popd
|
||||
|
17
tox.ini
17
tox.ini
@ -123,53 +123,49 @@ commands =
|
||||
[testenv:deploy-centos-binary]
|
||||
whitelist_externals = find
|
||||
bash
|
||||
sudo
|
||||
setenv =
|
||||
DOCKER_BUILD_TEST=1
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
|
||||
testr run test_build.DeployTestCentosBinary
|
||||
sudo {toxinidir}/tools/deploy_aio.sh centos binary
|
||||
{toxinidir}/tools/deploy_aio.sh centos binary
|
||||
{toxinidir}/tools/dump_info.sh
|
||||
|
||||
[testenv:deploy-centos-source]
|
||||
whitelist_externals = find
|
||||
bash
|
||||
sudo
|
||||
setenv =
|
||||
DOCKER_BUILD_TEST=1
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
|
||||
testr run test_build.DeployTestCentosSource
|
||||
sudo {toxinidir}/tools/deploy_aio.sh centos source
|
||||
{toxinidir}/tools/deploy_aio.sh centos source
|
||||
{toxinidir}/tools/dump_info.sh
|
||||
|
||||
[testenv:deploy-oraclelinux-binary]
|
||||
whitelist_externals = find
|
||||
bash
|
||||
sudo
|
||||
setenv =
|
||||
DOCKER_BUILD_TEST=1
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
|
||||
testr run test_build.DeployTestOracleLinuxBinary
|
||||
sudo {toxinidir}/tools/deploy_aio.sh oraclelinux binary
|
||||
{toxinidir}/tools/deploy_aio.sh oraclelinux binary
|
||||
{toxinidir}/tools/dump_info.sh
|
||||
|
||||
[testenv:deploy-oraclelinux-source]
|
||||
whitelist_externals = find
|
||||
bash
|
||||
sudo
|
||||
setenv =
|
||||
DOCKER_BUILD_TEST=1
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
|
||||
testr run test_build.DeployTestOracleLinuxSource
|
||||
sudo {toxinidir}/tools/deploy_aio.sh oraclelinux source
|
||||
{toxinidir}/tools/deploy_aio.sh oraclelinux source
|
||||
{toxinidir}/tools/dump_info.sh
|
||||
|
||||
[testenv:deploy-ubuntu-binary]
|
||||
@ -181,20 +177,19 @@ commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
|
||||
testr run test_build.DeployTestUbuntuBinary
|
||||
sudo {toxinidir}/tools/deploy_aio.sh ubuntu binary
|
||||
{toxinidir}/tools/deploy_aio.sh ubuntu binary
|
||||
{toxinidir}/tools/dump_info.sh
|
||||
|
||||
[testenv:deploy-ubuntu-source]
|
||||
whitelist_externals = find
|
||||
bash
|
||||
sudo
|
||||
setenv =
|
||||
DOCKER_BUILD_TEST=1
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
|
||||
testr run test_build.DeployTestUbuntuSource
|
||||
sudo {toxinidir}/tools/deploy_aio.sh ubuntu source
|
||||
{toxinidir}/tools/deploy_aio.sh ubuntu source
|
||||
{toxinidir}/tools/dump_info.sh
|
||||
|
||||
[testenv:deploy-multinode-ubuntu-source]
|
||||
|
Loading…
x
Reference in New Issue
Block a user