From 39aba34b2a884887cab117ff233469051cc2ec22 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Sun, 27 Sep 2015 08:10:59 +0000 Subject: Remove all fail sections for Ubuntu Ubuntu binary is not supported and may never be. Installing from cloud-archive packaging is only for the current stable distros, Ubuntu does not have a Delorean type repo. We place a fail message in the base image to catch this and remove the messages throughout the project. An additional fail message is placed to catch all other things. Change-Id: Id2953f503ebd42226f6a08e75979ae56511c40f7 Implements: blueprint install-from-ubuntu --- docker/base/Dockerfile.j2 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'docker/base') diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index a3dae428a..362387247 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -1,6 +1,29 @@ FROM {{ base_distro }}:{{ base_distro_tag }} MAINTAINER Kolla Project (https://launchpad.net/kolla) +# Early failure for bases and types +{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %} + {% if install_type not in ['source', 'binary', 'rdo', 'rhel'] %} + +RUN echo 'ERROR: {{ install_type }} is unavailable for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif base_distro in ['ubuntu', 'debian'] %} + {% if install_type not in ['source'] %} + +RUN echo 'ERROR: {{ install_type }} is unavailable for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% else %} + +RUN echo 'ERROR: The specified distro has no Kolla images to build: "{{ base_distro }}"' \ + && /bin/false + +{% endif %} + + {{ include_header }} ENV KOLLA_BASE_DISTRO {{ base_distro }} -- cgit v1.2.3