From 83b82dc6b8d5e382bdab745f8ffe138240be110d Mon Sep 17 00:00:00 2001 From: Maru Newby Date: Sat, 14 Feb 2015 05:18:23 +0000 Subject: [PATCH] Allow PROJECTS to be overridden Updating the default set of project repositories at the start of each dsvm job adds 3-5m to the job's runtime. For jobs that target only a small subset of those repos, that overhead is largely unnecessary. To minimize the overhead of workspace setup, this change allows the target project repositories (PROJECTS) to be overridden on a per-job basis via the DEVSTACK_GATE_PROJECTS_OVERRIDE variable. Change-Id: I0fb1bef66d82acdddeb9b29956fdd4311ea1f277 --- devstack-vm-gate-wrap.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index bda94a90..998caf69 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -357,6 +357,16 @@ export DEVSTACK_GATE_CEILOMETER_BACKEND=${DEVSTACK_GATE_CEILOMETER_BACKEND:-mysq # Set Zaqar backend to override the default one. It could be mongodb, redis. export DEVSTACK_GATE_ZAQAR_BACKEND=${DEVSTACK_GATE_ZAQAR_BACKEND:-mongodb} +# Set to a space-separated list of projects to prepare in the +# workspace, e.g. 'openstack-dev/devstack openstack/neutron'. +# Minimizing the number of targeted projects can reduce the setup cost +# for jobs that know exactly which repos they need. +export DEVSTACK_GATE_PROJECTS_OVERRIDE=${DEVSTACK_GATE_PROJECTS_OVERRIDE:-""} + +if [ -n "$DEVSTACK_GATE_PROJECTS_OVERRIDE" ]; then + PROJECTS=$DEVSTACK_GATE_PROJECTS_OVERRIDE +fi + if ! function_exists "gate_hook"; then # the command we use to run the gate function gate_hook {