Skip to content

Commit

Permalink
Allow ci_base image to be configurable
Browse files Browse the repository at this point in the history
fixes: #843
  • Loading branch information
gerrod3 committed Feb 12, 2024
1 parent 0528507 commit 6803179
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES/843.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow CI base image to be configured with `ci_base_image`.
1 change: 1 addition & 0 deletions plugin-template
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion templates/github/.ci/ansible/Containerfile.j2.copy
Original file line number Diff line number Diff line change
@@ -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 %}
Expand Down
12 changes: 8 additions & 4 deletions templates/github/.github/workflows/scripts/install.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit 6803179

Please sign in to comment.