From fcda6a06d8eee9d3f3199962b36a04a8c702072c Mon Sep 17 00:00:00 2001 From: Alicja Kwasniewska Date: Thu, 2 Jul 2015 17:08:59 +0000 Subject: Keystone installation from source Makes use of new gen-source-tar script to provide a source based keystone image. This patch introduces a new concept of a .buildinfo file, which provides variables specific to the image being built which cannot be defaulted in a generic way, at least until the build script is overhauled. This file is sourced before the .buildconf which still leaves everything customisable by the user. Co-Authored-By: Paul Bourke Change-Id: I0ec6b9cfe6d4173f3192e4ae5833fb0f6d333f1c Implements: blueprint install-from-source --- tools/build-docker-image | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools') diff --git a/tools/build-docker-image b/tools/build-docker-image index 9bd1d4273..7ab382333 100755 --- a/tools/build-docker-image +++ b/tools/build-docker-image @@ -36,6 +36,7 @@ EOF } [ -f $TOPDIR/.buildconf ] && . $TOPDIR/.buildconf +[ -f $IMGDIR/.buildinfo ] && . $IMGDIR/.buildinfo [ -f $IMGDIR/.buildconf ] && . $IMGDIR/.buildconf ARGS=$(getopt -o hr:n:t:pfuN -l help,prefix:,namespace:,push,pull,private-registry:,release,tag:,force-rm,no-cache,no-use-released-parent,retry: -- "$@") || { usage >&2; exit 2; } @@ -149,6 +150,10 @@ sed -i.bak "s|%%KOLLA_NAMESPACE%%|${NAMESPACE}|g" $TMPDIR/Dockerfile sed -i.bak "s|%%KOLLA_PREFIX%%|${PREFIX}|g" $TMPDIR/Dockerfile sed -i.bak "s|%%KOLLA_TAG%%|${PARENT_TAG}|g" $TMPDIR/Dockerfile +if [[ "${SOURCE_INSTALL_AVAILABLE}" == "1" ]]; then + . ${TOPDIR}/tools/gen-source-tar.sh +fi + TRY=0 while [ $((MAX_TRIES - 1)) -gt $TRY ]; do if docker build ${BUILDFLAGS} -t "$FULLIMAGE" $TMPDIR; then -- cgit v1.2.3