diff options
| author | Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | 2019-03-08 12:03:15 +0100 |
|---|---|---|
| committer | Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | 2019-03-11 16:52:09 +0100 |
| commit | ef83ff13fed6c4fb99a3f0445314fa08fa6fd932 (patch) | |
| tree | 55cfeb74d6e159c311e0fc09a7f7282660deac74 /docker/macros.j2 | |
| parent | fc8b5fa89df77f2f9f1f3a66849d3fbadd7f2299 (diff) | |
| download | kolla-ef83ff13fed6c4fb99a3f0445314fa08fa6fd932.tar.gz kolla-ef83ff13fed6c4fb99a3f0445314fa08fa6fd932.zip | |
Introduce 'get_pip' macro
We have code for it in four places so it is a good candidate for macro.
Change-Id: Icadcbbe5b386bdf688fd67e8160b40974f047377
Diffstat (limited to 'docker/macros.j2')
| -rw-r--r-- | docker/macros.j2 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docker/macros.j2 b/docker/macros.j2 index 5386dca75..aee933e7b 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -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 -%} |
