Fix upgrade jobs out of CI

With [1] got merget, we get broken logic for non-CI cases, where
env is spawned with gate-check-commit.sh script. We fix behaviour
and not export ZUUL_SRC_PATH when we're out of CI.

[1] eeabc721a5

Change-Id: If2741e98971f444153f7e1a8e04816896fbb715b
This commit is contained in:
Dmitriy Rabotyagov
2021-06-09 17:43:45 +03:00
parent bfc14c5d54
commit 684dbf0332

View File

@@ -248,10 +248,14 @@ if [[ "${ACTION}" == "upgrade" ]]; then
# /etc/openstack_deploy/env.d/aio_metal.yml for metal installs
export SKIP_CUSTOM_ENVD_CHECK=true
export DROP_ROLE_DIRS=true
# NOTE(noonedeadpunk): This might be moved to zuul.d/playbooks/run.yaml
export ZUUL_SRC_PATH="/home/zuul/src"
# Doing symlinking here, as bootstrap role won't be called
ln -s $ZUUL_SRC_PATH /openstack/src
# Export ZUUL_SRC_PATH only when integrated repo folder exists. Based on that
# we make an assumption about if we're in CI or not
if [[ -d "/home/zuul/src/opendev.org/openstack/openstack-ansible" ]]; then
export ZUUL_SRC_PATH="/home/zuul/src"
# Doing symlinking here, as bootstrap role won't be called
ln -s $ZUUL_SRC_PATH /openstack/src
fi
# To execute the upgrade script we need to provide
# an affirmative response to the warning that the
# upgrade is irreversable.