Recover CI run detection in imagebuild
The new zuul jobs use just /opt/stack instead of /opt/stack/new, breaking the constraints handling and using dependencies from source. This changes corrects it by accepting both directories. Change-Id: I8d6f8c99e1ab5f26e3537630d0f6086e02a2b1ec
This commit is contained in:
parent
ea934658c3
commit
041c1795db
@ -58,7 +58,11 @@ download_uc() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
copy_new_requirements_uc() {
|
copy_new_requirements_uc() {
|
||||||
|
if [ -e "/opt/stack/new/requirements" ]; then
|
||||||
copy "/opt/stack/new/requirements/upper-constraints.txt" "${DESTINATION}"
|
copy "/opt/stack/new/requirements/upper-constraints.txt" "${DESTINATION}"
|
||||||
|
elif [ -e "/opt/stack/requirements" ]; then
|
||||||
|
copy "/opt/stack/requirements/upper-constraints.txt" "${DESTINATION}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
download_from_tox_ini_url() {
|
download_from_tox_ini_url() {
|
||||||
|
@ -104,12 +104,20 @@ sudo mount --bind /proc $BUILDDIR/proc
|
|||||||
sudo mount --bind /dev/pts $BUILDDIR/dev/pts
|
sudo mount --bind /dev/pts $BUILDDIR/dev/pts
|
||||||
|
|
||||||
if [ -d /opt/stack/new ]; then
|
if [ -d /opt/stack/new ]; then
|
||||||
|
CI_DIR=/opt/stack/new
|
||||||
|
elif [ -d /opt/stack ]; then
|
||||||
|
CI_DIR=/opt/stack
|
||||||
|
else
|
||||||
|
CI_DIR=
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$CI_DIR" ]; then
|
||||||
# Running in CI environment, make checkouts available
|
# Running in CI environment, make checkouts available
|
||||||
$CHROOT_CMD mkdir -p /opt/stack/new
|
$CHROOT_CMD mkdir -p $CI_DIR
|
||||||
for project in $(ls /opt/stack/new); do
|
for project in $(ls $CI_DIR); do
|
||||||
if grep -q "$project" $BUILDDIR/tmp/upper-constraints.txt &&
|
if grep -q "$project" $BUILDDIR/tmp/upper-constraints.txt &&
|
||||||
[ -d "/opt/stack/new/$project/.git" ]; then
|
[ -d "$CI_DIR/$project/.git" ]; then
|
||||||
sudo cp -R "/opt/stack/new/$project" $BUILDDIR/opt/stack/new/
|
sudo cp -R "$CI_DIR/$project" $BUILDDIR/$CI_DIR/
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user