From 5456669b75b779343fef67a96145ae7b967e4745 Mon Sep 17 00:00:00 2001 From: Matthias Dellweg Date: Fri, 1 Aug 2025 15:40:36 +0200 Subject: [PATCH] Allow extra files injection into the container --- plugin-template | 1 + templates/github/.ci/ansible/Containerfile.j2.copy | 6 +++--- templates/github/.github/workflows/scripts/install.sh.j2 | 7 +++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/plugin-template b/plugin-template index 808000c1..0a8ba05e 100755 --- a/plugin-template +++ b/plugin-template @@ -33,6 +33,7 @@ DEFAULT_SETTINGS = { "deploy_to_pypi": True, "disabled_redis_runners": [], "docker_fixtures": False, + "extra_files": [], "flake8_ignore": [], "flake8": True, "github_org": "pulp", diff --git a/templates/github/.ci/ansible/Containerfile.j2.copy b/templates/github/.ci/ansible/Containerfile.j2.copy index d57b44ed..01469b64 100644 --- a/templates/github/.ci/ansible/Containerfile.j2.copy +++ b/templates/github/.ci/ansible/Containerfile.j2.copy @@ -5,9 +5,9 @@ FROM {{ ci_base | default(pulp_default_container) }} ADD ./{{ item.name }} ./{{ item.name }} {% endfor %} -# Install python packages -# S3 botocore needs to be patched to handle responses from minio during 0-byte uploads -# Hacking botocore (https://github.com/boto/botocore/pull/1990) +{% for item in extra_files | default([]) %} +ADD ./{{ item.origin }} {{ item.destination }} +{% endfor %} # This MUST be the ONLY call to pip install in inside the container. RUN pip3 install --upgrade pip setuptools wheel && \ diff --git a/templates/github/.github/workflows/scripts/install.sh.j2 b/templates/github/.github/workflows/scripts/install.sh.j2 index 30a3509c..324055ae 100755 --- a/templates/github/.github/workflows/scripts/install.sh.j2 +++ b/templates/github/.github/workflows/scripts/install.sh.j2 @@ -72,6 +72,13 @@ fi {%- endif %} cat >> vars/main.yaml << VARSYAML +{%- if extra_files %} +extra_files: + {%- for item in extra_files %} + - origin: "{{ item.origin }}" + destination: "{{ item.destination }}" + {%- endfor %} +{%- endif %} services: - name: pulp image: "pulp:ci_build"