Introduce 'get_pip' macro
We have code for it in four places so it is a good candidate for macro. Change-Id: Icadcbbe5b386bdf688fd67e8160b40974f047377
This commit is contained in:
parent
fc8b5fa89d
commit
ef83ff13fe
@ -45,9 +45,7 @@ RUN echo 'crane not yet available for {{ base_distro }}' && /bin/false
|
||||
{% endif %}
|
||||
|
||||
{% block crane_source_install_python_pip %}
|
||||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||
&& python get-pip.py \
|
||||
&& rm get-pip.py
|
||||
{{ macros.get_pip() }}
|
||||
{% endblock %}
|
||||
|
||||
ADD crane-archive /crane-source
|
||||
|
@ -35,9 +35,7 @@ ENV helm_version=2.3.0 \
|
||||
{{ macros.install_packages(helm_repo_packages | customizable("packages")) }}
|
||||
|
||||
{% block helm_repository_source_install_python_pip %}
|
||||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||
&& python get-pip.py \
|
||||
&& rm get-pip.py
|
||||
{{ macros.get_pip() }}
|
||||
{% endblock %}
|
||||
|
||||
{% set helm_repository_pip_packages = [
|
||||
|
@ -47,9 +47,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
{{ macros.install_packages(kolla_toolbox_packages | customizable("packages")) }}
|
||||
|
||||
{% block kolla_toolbox_source_install_python_pip %}
|
||||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||
&& python get-pip.py \
|
||||
&& rm get-pip.py
|
||||
{{ macros.get_pip() }}
|
||||
{% endblock %}
|
||||
|
||||
{% set kolla_toolbox_pip_virtualenv_packages = [
|
||||
|
@ -21,6 +21,12 @@
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro get_pip() %}
|
||||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||
&& python get-pip.py \
|
||||
&& rm get-pip.py
|
||||
{% endmacro %}
|
||||
|
||||
{% macro install_pip(packages, constraints = true, pip_version = pip) %}
|
||||
{%- if packages is sequence and packages|length > 0 -%}
|
||||
{%- if not pip_version -%}
|
||||
|
@ -185,9 +185,7 @@ ENV DEBIAN_FRONTEND noninteractive
|
||||
{{ macros.install_packages(openstack_base_packages | customizable("packages")) }}
|
||||
|
||||
{% block source_install_python_pip %}
|
||||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||
&& python get-pip.py \
|
||||
&& rm get-pip.py
|
||||
{{ macros.get_pip() }}
|
||||
{% endblock %}
|
||||
|
||||
{% set openstack_base_pip_packages = [
|
||||
|
4
releasenotes/notes/get_pip-macro-906a78462b216049.yaml
Normal file
4
releasenotes/notes/get_pip-macro-906a78462b216049.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
New macro: 'get_pip' allows to bootstrap 'pip' in image.
|
Loading…
Reference in New Issue
Block a user