Allow to install extra projects from source

It may be required to install additional python packages from source.
To do this download them into loci/data directory and specify names of
projects via EXTRA_PROJECTS argument during build.

Change-Id: Iadf9a14aa0aa9082abb4ba015b08d2e37a20f521
This commit is contained in:
Vasyl Saienko
2024-10-09 10:28:49 +00:00
parent 447845c0f7
commit 977cd4ba10
3 changed files with 9 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ ARG WHEELS=loci/requirements:master-ubuntu_jammy
ARG PROJECT_REPO=https://opendev.org/openstack/${PROJECT}
ARG PROJECT_REF=master
ARG PROJECT_RELEASE=master
ARG EXTRA_PROJECTS=""
ARG DISTRO=""
ARG PROFILES=""
ARG PIP_PACKAGES=""

View File

@@ -105,6 +105,7 @@ For more advanced building you can use docker build arguments to define:
* `REGISTRY_INSECURE` Set this to `True` if your image registry is
running on HTTPS with self-signed certificates to ignore SSL verification.
(defaults to False)
* `EXTRA_PROJECTS` extra projects to install from `loci/data` directory.
This makes it really easy to integrate LOCI images into your development or
CI/CD workflow, for example, if you wanted to build an image from [this

View File

@@ -94,7 +94,13 @@ fi
$(dirname $0)/clone_project.sh
$(dirname $0)/install_packages.sh
$(dirname $0)/pip_install.sh ${NO_INDEX} /tmp/${PROJECT} ${PIP_PACKAGES}
extra_projects_path=""
for pr in $EXTRA_PROJECTS; do
extra_projects_path="$extra_projects_path /tmp/${pr}"
done
$(dirname $0)/pip_install.sh ${NO_INDEX} /tmp/${PROJECT} ${extra_projects_path} ${PIP_PACKAGES}
for project_script in $(ls $(dirname $0)/project_specific/${PROJECT}); do
echo "Running $PROJECT specific script $project_script"
$(dirname $0)/project_specific/${PROJECT}/$project_script