1- FROM {{ ci_base | default(pulp_default_container) }}
1+ FROM {{ image.ci_base }}
2+ {%- if image.webserver_snippet %}
23
3- # Add source directories to container
4- {% for item in plugins %}
5- ADD ./{{ item.name }} ./{{ item.name }}
6- {% endfor %}
4+ ADD .{{ plugin_name | snake }}/app/webserver_snippets/nginx.conf" /etc/nginx/pulp/{{ plugin_name }}.conf
5+ {%- endif %}
6+
7+ {%- for item in extra_files | default([]) %}
78
8- {% for item in extra_files | default([]) %}
99ADD ./{{ item.origin }} {{ item.destination }}
10- {% endfor %}
10+ {%- endfor %}
1111
1212# This MUST be the ONLY call to pip install in inside the container.
1313RUN pip3 install --upgrade pip setuptools wheel && \
1414 rm -rf /root/.cache/pip && \
15- pip3 install
16- {%- if s3_test | default(false) -%}
17- {{ " " }}git+https://github.com/gerrod3/botocore.git@fix-100-continue
15+ pip3 install {{ image.source }}
16+ {%- if image.upperbounds | default(false) -%}
17+ {{ " " }}-c ./{{ plugin_name }}/upperbounds_constraints.txt
1818{%- endif -%}
19- {%- for item in plugins -%}
20- {{ " " }}{{ item.source }}
21- {%- if item.upperbounds | default(false) -%}
22- {{ " " }}-c ./{{ item.name }}/upperbounds_constraints.txt
19+ {%- if image.lowerbounds | default(false) -%}
20+ {{ " " }}-c ./{{ plugin_name }}/lowerbounds_constraints.txt
2321{%- endif -%}
24- {%- if item.lowerbounds | default(false) -%}
25- {{ " " }}-c ./{{ item.name }}/lowerbounds_constraints .txt
22+ {%- if image.ci_requirements | default(false) -%}
23+ {{ " " }}-r ./{{ plugin_name }}/ci_requirements .txt
2624{%- endif -%}
27- {%- if item.ci_requirements | default(false) -%}
28- {{ " " }}-r ./{{ item.name }}/ci_requirements.txt
29- {%- endif -%}
30- {%- endfor %}
31- {{ " " }}-c ./{{ plugins[0].name }}/.ci/assets/ci_constraints.txt && \
25+ {{ " " }}-c ./{{ plugin_name }}/.ci/assets/ci_constraints.txt && \
3226 rm -rf /root/.cache/pip
3327
3428{% if pulp_env is defined and pulp_env %}
@@ -48,9 +42,4 @@ RUN PULP_STATIC_ROOT=/var/lib/operator/static/ PULP_CONTENT_ORIGIN=localhost \
4842 /usr/local/bin/pulpcore-manager collectstatic --clear --noinput --link
4943USER root:root
5044
51- {% for item in plugins %}
52- RUN export plugin_path="$(pip3 show {{ item.name }} | sed -n -e 's/Location: //p')/{{ item.name }}" && \
53- ln $plugin_path/app/webserver_snippets/nginx.conf /etc/nginx/pulp/{{ item.name }}.conf || true
54- {% endfor %}
55-
5645ENTRYPOINT ["/init"]
0 commit comments