16f9d2ebf8
There is a bug in the octavia-lib DIB element where it runs install actions that should only be ran when the amphora-agent is installed from source. This issue causes the amphora image build to fail when installing the amphora-agent from distribution packages (option -p in the diskimage-create.sh tool). Task: 40870 Story: 2008138 Change-Id: I46ba7798322f24255ab7d49db4b4df886e92cbf3
18 lines
470 B
Bash
Executable File
18 lines
470 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
[ "${DIB_INSTALLTYPE_amphora_agent:-}" = "package" ] && exit 0
|
|
|
|
AMP_VENV=/opt/amphora-agent-venv
|
|
|
|
sed -i 's|octavia-lib|#octavia-lib|' /opt/upper-constraints.txt
|
|
$AMP_VENV/bin/pip install -U -c /opt/upper-constraints.txt /opt/octavia-lib
|
|
|
|
# Let's capture the git reference we installed in the venv
|
|
git --git-dir=/opt/octavia-lib/.git rev-parse HEAD >> /opt/octavia-lib.gitref
|