Merge autopkgtest-cloud:b-a-i-net-name-regions into autopkgtest-cloud:master

Proposed by Brian Murray
Status: Merged
Merged at revision: ea08299f3d901d3be772720a5f8a22fce0f6a6f1
Proposed branch: autopkgtest-cloud:b-a-i-net-name-regions
Merge into: autopkgtest-cloud:master
Diff against target: 21 lines (+9/-1)
1 file modified
charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image (+9/-1)
Reviewer Review Type Date Requested Status
Tim Andersson Approve
Review via email: mp+460139@code.launchpad.net

Description of the change

bos03 in PS6 doesn't have a `net_prod-proposed-migration` but that shouldn't stop us from being able to use it! This modifies build-adt-image to check for region and arch specific variations of the net-name file.

I have cowboy'ed this in production and it worked well.

To post a comment you must log in.
Revision history for this message
Tim Andersson (andersson123) wrote :

CI failure is tempfail, merging

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image
2index b80ec6e..bd9006c 100755
3--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image
4+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image
5@@ -21,7 +21,15 @@ if [ -z "${MIRROR:-}" ]; then
6 fi
7 export MIRROR
8
9-[ -z "${NET_NAME:-}" ] && . ~/net-name.rc
10+if [ -z "${NET_NAME:-}" ]; then
11+ if [ -e ~/net-name-"${REGION}"-"${ARCH}".rc ]; then
12+ . ~/net-name-"${REGION}"-"${ARCH}".rc
13+ elif [ -e ~/net-name-"${REGION}".rc ]; then
14+ . ~/net-name-"${REGION}".rc
15+ else
16+ . ~/net-name.rc
17+ fi
18+fi
19 export NET_NAME
20
21 if [ -z "${USE_CLOUD_CONFIG_FROM_ENV:-}" ]; then

Subscribers

People subscribed via source and target branches