[imagebuild] support requirements referring to /opt/stack/new
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
This commit is contained in:
parent
7dbe9b5bed
commit
381f5073b5
@ -80,6 +80,8 @@ cp requirements.txt $BUILDDIR/tmp/ipa-requirements.txt
|
||||
|
||||
imagebuild/common/generate_upper_constraints.sh upper-constraints.txt
|
||||
cp upper-constraints.txt $BUILDDIR/tmp/upper-constraints.txt
|
||||
echo Using upper-constraints:
|
||||
cat upper-constraints.txt
|
||||
cd $WORKDIR
|
||||
|
||||
sudo cp /etc/resolv.conf $BUILDDIR/etc/resolv.conf
|
||||
@ -88,6 +90,17 @@ trap "sudo umount $BUILDDIR/proc; sudo umount $BUILDDIR/dev/pts" EXIT
|
||||
sudo mount --bind /proc $BUILDDIR/proc
|
||||
sudo mount --bind /dev/pts $BUILDDIR/dev/pts
|
||||
|
||||
if [ -d /opt/stack/new ]; then
|
||||
# Running in CI environment, make checkouts available
|
||||
$CHROOT_CMD mkdir -p /opt/stack/new
|
||||
for project in $(ls /opt/stack/new); do
|
||||
if grep -q "$project" $BUILDDIR/tmp/upper-constraints.txt &&
|
||||
[ -d "/opt/stack/new/$project/.git" ]; then
|
||||
sudo cp -R "/opt/stack/new/$project" $BUILDDIR/opt/stack/new/
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
$CHROOT_CMD mkdir /etc/sysconfig/tcedir
|
||||
$CHROOT_CMD chmod a+rwx /etc/sysconfig/tcedir
|
||||
$CHROOT_CMD touch /etc/sysconfig/tcuser
|
||||
@ -107,6 +120,8 @@ $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels setu
|
||||
$CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels pip
|
||||
$CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ipa-requirements.txt
|
||||
$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
|
||||
echo Resulting wheels:
|
||||
ls -1 $BUILDDIR/tmp/wheels
|
||||
|
||||
# Build tgt
|
||||
rm -rf $WORKDIR/build_files/tgt.tcz
|
||||
|
@ -18,3 +18,4 @@ zlib_base-dev.tcz
|
||||
glib2-dev.tcz
|
||||
pixman-dev.tcz
|
||||
binutils.tcz
|
||||
git.tcz
|
||||
|
@ -143,9 +143,7 @@ $CHROOT_CMD depmod -a `$WORKDIR/build_files/fakeuname -r`
|
||||
|
||||
# If flag is set install the python now
|
||||
if $BUILD_AND_INSTALL_TINYIPA ; then
|
||||
cp -a $BUILDDIR/tmp/upper-constraints.txt $FINALDIR/tmp/upper-constraints.txt
|
||||
$CHROOT_CMD python /tmp/get-pip.py -c /tmp/upper-constraints.txt --no-wheel --no-index --find-links=file:///tmp/wheelhouse ironic_python_agent
|
||||
rm -rf $FINALDIR/tmp/upper-constraints.txt
|
||||
$CHROOT_CMD python /tmp/get-pip.py --no-wheel --no-index --find-links=file:///tmp/wheelhouse --pre ironic_python_agent
|
||||
rm -rf $FINALDIR/tmp/wheelhouse
|
||||
rm -rf $FINALDIR/tmp/get-pip.py
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user