From d9f973367617b7d1fe4115a430467f01f1e62b56 Mon Sep 17 00:00:00 2001 From: Carlos Goncalves Date: Wed, 5 Feb 2020 18:54:42 +0100 Subject: [PATCH] Update branch checkout and u-c.txt for Octavia Octavia has a diskimage-builder element to install the amphora-agent. When creating an amphora image from an Octavia stable branch, the expectation is the amphora-agent code will match the same branch (master or stable). However, the amphora-agent always pulls master versions of upper-constraints.txt and of the Octavia Git repository. This patch updates the branch name and upper constraints for the amphora-agent in Octavia on stable branch creation. Change-Id: I8eba64c886c187c8652f94735ca6153702203d17 --- .../copy-release-tools-scripts/files/release-tools/functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/copy-release-tools-scripts/files/release-tools/functions b/roles/copy-release-tools-scripts/files/release-tools/functions index 5342c832c5..3be4d8be18 100644 --- a/roles/copy-release-tools-scripts/files/release-tools/functions +++ b/roles/copy-release-tools-scripts/files/release-tools/functions @@ -88,6 +88,11 @@ function update_upper_constraints { fi sed -i~ -e "s,{\(env:UPPER_CONSTRAINTS_FILE\)[^ ]*},{\1:$uc_url}," tox.ini sed -i~ -e "s,{\(env:TOX_CONSTRAINTS_FILE\)[^ ]*},{\1:$uc_url}," tox.ini + # Octavia project specific + if [[ -f elements/amphora-agent/source-repository-amphora-agent ]]; then + sed -i~ -e "s,\(https://opendev.org/openstack/octavia\).*,\1 ${branch}," elements/amphora-agent/source-repository-amphora-agent + sed -i~ -e "s,\(file /opt/upper-constraints.txt\) \(.*\),\1 ${uc_url}," elements/amphora-agent/source-repository-amphora-agent + fi if ! git diff --exit-code >/dev/null 2>&1 ; then git add tox.ini msg="Update TOX/UPPER_CONSTRAINTS_FILE for $branch"