diff --git a/CHANGES/843.feature b/CHANGES/843.feature new file mode 100644 index 00000000..31ce41c3 --- /dev/null +++ b/CHANGES/843.feature @@ -0,0 +1 @@ +Allow CI base image to be configured with `ci_base_image`. \ No newline at end of file diff --git a/plugin-template b/plugin-template index 7b58e00a..28422c84 100755 --- a/plugin-template +++ b/plugin-template @@ -27,6 +27,7 @@ DEFAULT_SETTINGS = { "check_stray_pulpcore_imports": True, "cli_package": "pulp-cli", "cli_repo": "https://github.com/pulp/pulp-cli.git", + "ci_base_image": "ghcr.io/pulp/pulp-ci-centos", "ci_env": {}, "ci_trigger": "{pull_request: {branches: ['*']}}", "ci_update_docs": False, diff --git a/templates/github/.ci/ansible/Containerfile.j2.copy b/templates/github/.ci/ansible/Containerfile.j2.copy index c6c21fdb..15d360ab 100644 --- a/templates/github/.ci/ansible/Containerfile.j2.copy +++ b/templates/github/.ci/ansible/Containerfile.j2.copy @@ -1,4 +1,4 @@ -FROM {{ ci_base | default("ghcr.io/pulp/pulp-ci-centos:" + pulp_container_tag) }} +FROM {{ ci_base | default(pulp_default_container) }} # Add source directories to container {% for item in plugins %} diff --git a/templates/github/.github/workflows/scripts/install.sh.j2 b/templates/github/.github/workflows/scripts/install.sh.j2 index aa2eff98..113e1dab 100755 --- a/templates/github/.github/workflows/scripts/install.sh.j2 +++ b/templates/github/.github/workflows/scripts/install.sh.j2 @@ -96,11 +96,15 @@ cat >> vars/main.yaml << VARSYAML pulp_env: {{ pulp_env | tojson }} pulp_settings: {{ pulp_settings | tojson }} pulp_scheme: {{ pulp_scheme }} -{% if python_version == "3.6" %} -pulp_container_tag: "python36" +{%- if ci_base_image.count(":") %} +pulp_default_container: {{ ci_base_image }} {% else %} -pulp_container_tag: "latest" -{% endif %} +{%- if python_version == "3.6" %} +pulp_default_container: {{ ci_base_image + ":python36" }} +{% else %} +pulp_default_container: {{ ci_base_image + ":latest" }} +{% endif -%} +{% endif -%} VARSYAML {%- if docker_fixtures %}