From 0a6c47d6cf9406ae97e23a563f2aefa64785a7b3 Mon Sep 17 00:00:00 2001 From: Artur Zarzycki Date: Thu, 3 Nov 2016 17:15:33 +0100 Subject: [PATCH] Add support for debian packages caching server If APT_CACHE_SERVER variable is set then add option with it to config. Example: APT_CACHE_SERVER="http://some_cache_server:3142" Change-Id: Ic6d723d2715ab0be60a42f324b97d8ee02a1d97e --- tools/ccp-multi-deploy/ccp-multi-deploy.sh | 14 ++++++++++++++ tox.ini | 1 + 2 files changed, 15 insertions(+) diff --git a/tools/ccp-multi-deploy/ccp-multi-deploy.sh b/tools/ccp-multi-deploy/ccp-multi-deploy.sh index f41e3916..d57d09ac 100755 --- a/tools/ccp-multi-deploy/ccp-multi-deploy.sh +++ b/tools/ccp-multi-deploy/ccp-multi-deploy.sh @@ -95,6 +95,20 @@ if [ `kubectl get nodes | grep node | wc -l` -lt $(($NUMBER_OF_ENVS * 3)) ]; the fi +if [ -n "${APT_CACHE_SERVER}" ]; then + cat >>"${CONFIG_DIR}"/ccp-configs-common.yaml << EOF +url: + debian: ${APT_CACHE_SERVER}/debian + security: ${APT_CACHE_SERVER}/security + ceph: + debian: + repo: ${APT_CACHE_SERVER}/ceph + mariadb: + debian: + repo: ${APT_CACHE_SERVER}/mariadb +EOF +fi + # Fetch CCP repos CCP="ccp --verbose --debug --config-file ${CONFIG_DIR}/ccp-cli-${VERSION}-config-1.yaml" ${CCP} fetch diff --git a/tox.ini b/tox.ini index 6a232aea..7f1d6dc8 100644 --- a/tox.ini +++ b/tox.ini @@ -42,6 +42,7 @@ commands = python setup.py build_sphinx commands = oslo_debug_helper {posargs} [testenv:multi-deploy] +passenv = APT_CACHE_SERVER commands = bash -ex "{toxinidir}/tools/ccp-multi-deploy/ccp-multi-deploy.sh" {posargs}