create 'add_binary_source_envs' macro and use it

There is small subset of images where we need to know which install_type
or install_metatype is used. So add them only there (and their
children).

Change-Id: Ib7d5e36b958d6c8daf2989df32e29fa24b46c62a
Implements: blueprint infra-images
This commit is contained in:
Marcin Juszkiewicz committed 2020-09-21 12:10:57 +00:00
1 parent 94c8465bd5
commit 87730f8f7c
7 files changed
+10 -4

No files matched your search

-2
View File
@@ -24,8 +24,6 @@ LABEL kolla_version="{{ kolla_version }}"
{% block base_header %}{% endblock %}
ENV KOLLA_BASE_DISTRO={{ base_distro }} \
KOLLA_INSTALL_TYPE={{ install_type }} \
KOLLA_INSTALL_METATYPE={{ install_metatype }} \
KOLLA_DISTRO_PYTHON_VERSION={{ distro_python_version }} \
KOLLA_BASE_ARCH={{ base_arch }}
+1
View File
@@ -10,6 +10,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% import "macros.j2" as macros with context %}
{{ macros.add_binary_source_envs() }}
{{ macros.configure_user(name='ansible') }}
{{ macros.configure_user(name='rabbitmq') }}
+5
View File
@@ -80,3 +80,8 @@ RUN usermod --append --home {{ homedir }} --groups kolla {{ name }} \
{{ handle_repos(repos, 'disable') }}
{% endmacro %}
{% macro add_binary_source_envs() %}
ENV KOLLA_INSTALL_TYPE={{ install_type }} \
KOLLA_INSTALL_METATYPE={{ install_metatype }}
{% endmacro %}
@@ -9,6 +9,7 @@ USER root
{% import "macros.j2" as macros with context %}
{{ macros.add_binary_source_envs() }}
{{ macros.configure_user(name='monasca') }}
{% if install_type == 'binary' %}
+1
View File
@@ -7,6 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% import "macros.j2" as macros with context %}
{{ macros.add_binary_source_envs() }}
{{ macros.enable_extra_repos(['opstools']) }}
{% if install_type == 'binary' %}
+1 -1
View File
@@ -13,7 +13,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
#TODO(sean-k-mooney) create repo via open suse build system to package
# for centos/rhel distros.
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
RUN echo 'image not yet available for {{ base_distro }}' \
&& /bin/false
{% elif base_package_type == 'deb' %}
+1 -1
View File
@@ -12,7 +12,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% block skydive_install %}
{% if base_arch != 'x86_64' %}
RUN echo '{{ install_type }} on {{ base_distro }} not yet available on non x86_64 platforms' \
RUN echo 'image on {{ base_distro }} is not yet available on non x86_64 platforms' \
&& /bin/false
{% else %}
RUN curl -o /usr/bin/skydive -L "https://github.com/skydive-project/skydive/releases/download/v0.26.0/skydive" \