diff options
authorDmitry Tantsur <>2017-06-05 13:09:06 +0200
committerDmitry Tantsur <>2017-06-07 15:38:03 +0000
commitbfb152091d48cf5157aeca15ab94011f24aab718 (patch)
parent7d6a7c751afa7833fd17e858221f8b22a5fbaaee (diff)
[imagebuild] support requirements referring to /opt/stack/newstable/ocata
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 <> Code-Review+1: Julia Kreger <> Workflow+1: Ruby Loo <> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 12 Jun 2017 15:58:16 +0000 Reviewed-on: Project: openstack/ironic-python-agent Branch: refs/heads/stable/ocata
3 files changed, 17 insertions, 3 deletions
diff --git a/imagebuild/tinyipa/ b/imagebuild/tinyipa/
index 1d75c0e..a2eb8c2 100755
--- a/imagebuild/tinyipa/
+++ b/imagebuild/tinyipa/
@@ -76,6 +76,8 @@ cp requirements.txt $BUILDDIR/tmp/ipa-requirements.txt
76 76
77imagebuild/common/ upper-constraints.txt 77imagebuild/common/ upper-constraints.txt
78cp upper-constraints.txt $BUILDDIR/tmp/upper-constraints.txt 78cp upper-constraints.txt $BUILDDIR/tmp/upper-constraints.txt
79echo Using upper-constraints:
80cat upper-constraints.txt
80 82
81sudo cp /etc/resolv.conf $BUILDDIR/etc/resolv.conf 83sudo cp /etc/resolv.conf $BUILDDIR/etc/resolv.conf
@@ -84,6 +86,17 @@ trap "sudo umount $BUILDDIR/proc; sudo umount $BUILDDIR/dev/pts" EXIT
84sudo mount --bind /proc $BUILDDIR/proc 86sudo mount --bind /proc $BUILDDIR/proc
85sudo mount --bind /dev/pts $BUILDDIR/dev/pts 87sudo mount --bind /dev/pts $BUILDDIR/dev/pts
86 88
89if [ -d /opt/stack/new ]; then
90 # Running in CI environment, make checkouts available
91 $CHROOT_CMD mkdir -p /opt/stack/new
92 for project in $(ls /opt/stack/new); do
93 if grep -q "$project" $BUILDDIR/tmp/upper-constraints.txt &&
94 [ -d "/opt/stack/new/$project/.git" ]; then
95 sudo cp -R "/opt/stack/new/$project" $BUILDDIR/opt/stack/new/
96 fi
97 done
87$CHROOT_CMD mkdir /etc/sysconfig/tcedir 100$CHROOT_CMD mkdir /etc/sysconfig/tcedir
88$CHROOT_CMD chmod a+rwx /etc/sysconfig/tcedir 101$CHROOT_CMD chmod a+rwx /etc/sysconfig/tcedir
89$CHROOT_CMD touch /etc/sysconfig/tcuser 102$CHROOT_CMD touch /etc/sysconfig/tcuser
@@ -103,6 +116,8 @@ $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels setu
103$CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels pip 116$CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels pip
104$CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ipa-requirements.txt 117$CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ipa-requirements.txt
105$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 118$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
119echo Resulting wheels:
120ls -1 $BUILDDIR/tmp/wheels
106 121
107# Build tgt 122# Build tgt
108rm -rf $WORKDIR/build_files/tgt.tcz 123rm -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 c714e63..7bfc959 100755
--- a/imagebuild/tinyipa/
+++ b/imagebuild/tinyipa/
@@ -136,9 +136,7 @@ $CHROOT_CMD depmod -a `$WORKDIR/build_files/fakeuname -r`
136 136
137# If flag is set install the python now 137# If flag is set install the python now
139 cp -a $BUILDDIR/tmp/upper-constraints.txt $FINALDIR/tmp/upper-constraints.txt 139 $CHROOT_CMD python /tmp/ --no-wheel --no-index --find-links=file:///tmp/wheelhouse --pre ironic_python_agent
140 $CHROOT_CMD python /tmp/ -c /tmp/upper-constraints.txt --no-wheel --no-index --find-links=file:///tmp/wheelhouse ironic_python_agent
141 rm -rf $FINALDIR/tmp/upper-constraints.txt
142 rm -rf $FINALDIR/tmp/wheelhouse 140 rm -rf $FINALDIR/tmp/wheelhouse
143 rm -rf $FINALDIR/tmp/ 141 rm -rf $FINALDIR/tmp/
144fi 142fi