3eff4bc0d1
Customizations of packages for source builds Closes-Bug: #1623083 Change-Id: I99263af53c8f9830bcf0c6fec78194c8f7cd88c5
20 lines
845 B
Django/Jinja
20 lines
845 B
Django/Jinja
{% macro install_packages(packages) -%}
|
|
{% if packages is defined and packages|length > 0 -%}
|
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] -%}
|
|
RUN yum -y install {{ packages | join(' ') }} && yum clean all
|
|
{%- elif base_distro in ['ubuntu', 'debian'] -%}
|
|
{#-
|
|
debian_package_install is a utility method to build up an appropriate
|
|
set of commands to install packages in a debian-based environment that
|
|
may include URL links to a .deb package (e.g, heka)
|
|
-#}
|
|
RUN {{ debian_package_install(packages) }}
|
|
{%- endif %}
|
|
{%- endif %}
|
|
{%- endmacro %}
|
|
|
|
|
|
{% macro install_pip(packages) %}
|
|
RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt {% for package in packages %}{{ package }} {% endfor %}
|
|
{% endmacro %}
|