diff options
authorDmitry Tantsur <>2017-06-05 13:09:06 +0200
committerDmitry Tantsur <>2017-06-12 15:58:45 +0000
commit553b72dc819a9765521f2f8938da9dbeb1609d38 (patch)
parente46f75ed0924bae57bc885a950c68a193c5e0eec (diff)
[imagebuild] support requirements referring to /opt/stack/newstable/newton
Now that ironic-lib builds IPA from source, the IPA building procedure needs to support requirements referring to /opt/stack/new. As upper-constraints are not actually needed in the finalise step, they're no longer used there to avoid dealing with file:/// references. We also allow pre-release packages to be installed by pip. Also install git as it's a build requirement for PBR. Only tinyipa is updated, as it's used in the ironic-lib gate. Change-Id: Ia942cb710eb3fe1ba56c68f91fa893795c9cb651 Closes-Bug: #1695877 (cherry picked from commit 381f5073b5d7b15ac848cdbc8dfbb252ff417aba)
Notes (review): Code-Review+2: Ruby Loo <> Workflow+1: Ruby Loo <> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 13 Jun 2017 13:59:11 +0000 Reviewed-on: Project: openstack/ironic-python-agent Branch: refs/heads/stable/newton
3 files changed, 17 insertions, 3 deletions
diff --git a/imagebuild/tinyipa/ b/imagebuild/tinyipa/
index 55bc94d..d665375 100755
--- a/imagebuild/tinyipa/
+++ b/imagebuild/tinyipa/
@@ -68,6 +68,8 @@ cp requirements.txt $BUILDDIR/tmp/ipa-requirements.txt
68 68
69imagebuild/common/ upper-constraints.txt 69imagebuild/common/ upper-constraints.txt
70cp upper-constraints.txt $BUILDDIR/tmp/upper-constraints.txt 70cp upper-constraints.txt $BUILDDIR/tmp/upper-constraints.txt
71echo Using upper-constraints:
72cat upper-constraints.txt
72 74
73sudo cp /etc/resolv.conf $BUILDDIR/etc/resolv.conf 75sudo cp /etc/resolv.conf $BUILDDIR/etc/resolv.conf
@@ -76,6 +78,17 @@ trap "sudo umount $BUILDDIR/proc; sudo umount $BUILDDIR/dev/pts" EXIT
76sudo mount --bind /proc $BUILDDIR/proc 78sudo mount --bind /proc $BUILDDIR/proc
77sudo mount --bind /dev/pts $BUILDDIR/dev/pts 79sudo mount --bind /dev/pts $BUILDDIR/dev/pts
78 80
81if [ -d /opt/stack/new ]; then
82 # Running in CI environment, make checkouts available
83 $CHROOT_CMD mkdir -p /opt/stack/new
84 for project in $(ls /opt/stack/new); do
85 if grep -q "$project" $BUILDDIR/tmp/upper-constraints.txt &&
86 [ -d "/opt/stack/new/$project/.git" ]; then
87 sudo cp -R "/opt/stack/new/$project" $BUILDDIR/opt/stack/new/
88 fi
89 done
79$CHROOT_CMD mkdir /etc/sysconfig/tcedir 92$CHROOT_CMD mkdir /etc/sysconfig/tcedir
80$CHROOT_CMD chmod a+rwx /etc/sysconfig/tcedir 93$CHROOT_CMD chmod a+rwx /etc/sysconfig/tcedir
81$CHROOT_CMD touch /etc/sysconfig/tcuser 94$CHROOT_CMD touch /etc/sysconfig/tcuser
@@ -95,6 +108,8 @@ $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels setu
95$CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels pip 108$CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels pip
96$CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ipa-requirements.txt 109$CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ipa-requirements.txt
97$CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --no-index --pre --wheel-dir /tmp/wheels --find-links=/tmp/localpip --find-links=/tmp/wheels ironic-python-agent 110$CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --no-index --pre --wheel-dir /tmp/wheels --find-links=/tmp/localpip --find-links=/tmp/wheels ironic-python-agent
111echo Resulting wheels:
112ls -1 $BUILDDIR/tmp/wheels
98 113
99# Build tgt 114# Build tgt
100rm -rf $WORKDIR/build_files/tgt.tcz 115rm -rf $WORKDIR/build_files/tgt.tcz
diff --git a/imagebuild/tinyipa/build_files/buildreqs.lst b/imagebuild/tinyipa/build_files/buildreqs.lst
index 2b5c216..5e16e43 100644
--- a/imagebuild/tinyipa/build_files/buildreqs.lst
+++ b/imagebuild/tinyipa/build_files/buildreqs.lst
@@ -16,3 +16,4 @@ zlib_base-dev.tcz
16glib2-dev.tcz 16glib2-dev.tcz
17pixman-dev.tcz 17pixman-dev.tcz
18binutils.tcz 18binutils.tcz
diff --git a/imagebuild/tinyipa/ b/imagebuild/tinyipa/
index 49b5d8c..27c0db2 100755
--- a/imagebuild/tinyipa/
+++ b/imagebuild/tinyipa/
@@ -123,9 +123,7 @@ $CHROOT_CMD depmod -a `$WORKDIR/build_files/fakeuname -r`
123 123
124# If flag is set install the python now 124# If flag is set install the python now
126 cp -a $BUILDDIR/tmp/upper-constraints.txt $FINALDIR/tmp/upper-constraints.txt 126 $CHROOT_CMD python /tmp/ --no-wheel --no-index --find-links=file:///tmp/wheelhouse --pre ironic_python_agent
127 $CHROOT_CMD python /tmp/ -c /tmp/upper-constraints.txt --no-wheel --no-index --find-links=file:///tmp/wheelhouse ironic_python_agent
128 rm -rf $FINALDIR/tmp/upper-constraints.txt
129 rm -rf $FINALDIR/tmp/wheelhouse 127 rm -rf $FINALDIR/tmp/wheelhouse
130 rm -rf $FINALDIR/tmp/ 128 rm -rf $FINALDIR/tmp/
131fi 129fi