Merge autopkgtest-cloud:series-bootstrapping into autopkgtest-cloud:master

Proposed by Steve Langasek
Status: Merged
Merged at revision: 5d852a54917f310166b8d059d91460e99fca23af
Proposed branch: autopkgtest-cloud:series-bootstrapping
Merge into: autopkgtest-cloud:master
Diff against target: 30 lines (+12/-0)
1 file modified
tools/build-adt-image-all-clouds (+12/-0)
Reviewer Review Type Date Requested Status
Iain Lane Approve
Review via email: mp+332758@code.launchpad.net

Description of the change

It seems generally useful to be able to bootstrap our autopkgtest nova images in parallel with the cloud image creation. This would let us support it explicitly.

To post a comment you must log in.
Revision history for this message
Iain Lane (laney) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tools/build-adt-image-all-clouds b/tools/build-adt-image-all-clouds
2index 103759b..fa26b2a 100755
3--- a/tools/build-adt-image-all-clouds
4+++ b/tools/build-adt-image-all-clouds
5@@ -5,6 +5,12 @@ set -eu
6
7 SETUP_SCRIPT="$1"
8 RELEASE=${RELEASE:-$(distro-info --devel)}
9+case $2 in
10+ --bootstrap)
11+ BASE_RELEASE=${BASE_RELEASE:-$(distro-info --stable)}
12+ ;;
13+esac
14+
15 ARCHES="ppc64el i386 amd64 arm64"
16 export MIRROR=http://ftpmaster.internal/ubuntu
17
18@@ -21,6 +27,12 @@ do_one_cloud() {
19 IMG=$(echo "$IMGS" | grep "${RELEASE}-daily-${arch}" | tail -n1 | awk '{print $2}')
20 # Fall back to previous adt image and upgrade that
21 [ -n "$IMG" ] || IMG=$(echo "$IMGS" | grep "${RELEASE}-adt-${arch}" | tail -n1 | awk '{print $2}')
22+ # If we have neither, and --bootstrap is passed, fall back to the
23+ # latest stable release
24+ if [ -n "$BASE_RELEASE" ]; then
25+ [ -n "$IMG" ] || IMG=$(echo "$IMGS" | grep "${BASE_RELEASE}-daily-${arch}" | tail -n1 | awk '{print $2}')
26+ [ -n "$IMG" ] || IMG=$(echo "$IMGS" | grep "${BASE_RELEASE}-adt-${arch}" | tail -n1 | awk '{print $2}')
27+ fi
28 [ -n "$IMG" ] || continue
29 echo "$(date -R) $arch: using image $IMG"
30 $(dirname $0)/create-nova-image-new-release $RELEASE $IMG testbed-`hostname` "$SETUP_SCRIPT"

Subscribers

People subscribed via source and target branches