From 12cf47da0b253461a041d499561e2ebecc65f2e9 Mon Sep 17 00:00:00 2001
From: Julia Kreger <juliaashleykreger@gmail.com>
Date: Tue, 26 Mar 2024 06:56:50 -0700
Subject: [PATCH] ci: automatically set the branch for IPA to match
 TARGET_BRANCH

... if present, use TARGET_BRANCH parameter to influence which
branch is used for IPA downloads.

Change-Id: I9d8878ddc56f1cd90debfc2e61838162fe39e039
---
 devstack/lib/ironic | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devstack/lib/ironic b/devstack/lib/ironic
index 267025f007..4aa0028dee 100644
--- a/devstack/lib/ironic
+++ b/devstack/lib/ironic
@@ -324,7 +324,7 @@ IRONIC_DEPLOY_ISO=${IRONIC_DEPLOY_ISO:-$TOP_DIR/files/ir-deploy-$IRONIC_DEPLOY_D
 IRONIC_EFIBOOT=${IRONIC_EFIBOOT:-$TOP_DIR/files/ir-deploy-$IRONIC_DEPLOY_DRIVER.efiboot}
 
 # NOTE(jroll) this needs to be updated when stable branches are cut
-IPA_DOWNLOAD_BRANCH=${IPA_DOWNLOAD_BRANCH:-master}
+IPA_DOWNLOAD_BRANCH=${IPA_DOWNLOAD_BRANCH:-${TARGET_BRANCH:-master}}
 IPA_DOWNLOAD_BRANCH=$(echo $IPA_DOWNLOAD_BRANCH | tr / -)
 
 # OS for using with DIB images