From c19b5025a03c5e9d03e20ce8aa1db419cbf1ee39 Mon Sep 17 00:00:00 2001 From: Amartya Sinha Date: Thu, 12 Mar 2026 15:31:12 +0530 Subject: [PATCH] [multiple] Replace hardcoded container image ns and tag vars Replacing the hardcoded values to ensure easy maintenance of variables in ci-framework through group_vars Signed-off-by: Amartya Sinha --- group_vars/all.yml | 7 +++++++ hooks/playbooks/barbican-enable-luna.yml | 4 ++-- hooks/playbooks/barbican-prepare-proteccio.yml | 4 ++-- roles/build_containers/README.md | 4 ++-- roles/build_containers/defaults/main.yml | 4 ++-- roles/edpm_build_images/defaults/main.yml | 2 +- roles/repo_setup/defaults/main.yml | 2 +- roles/reproducer/templates/content-provider.yml.j2 | 4 ++-- roles/set_openstack_containers/README.md | 4 ++-- roles/set_openstack_containers/defaults/main.yml | 4 ++-- roles/tempest/README.md | 4 ++-- roles/tempest/defaults/main.yml | 4 ++-- roles/test_operator/defaults/main.yml | 4 ++-- roles/update/defaults/main.yml | 4 ++-- roles/update_containers/README.md | 4 ++-- roles/update_containers/defaults/main.yml | 4 ++-- roles/validations/defaults/main.yml | 2 +- scenarios/centos-9/edpm_periodic.yml | 2 +- scenarios/centos-9/meta_content_provider.yml | 2 +- 19 files changed, 38 insertions(+), 31 deletions(-) diff --git a/group_vars/all.yml b/group_vars/all.yml index 3db59e977f..7ca32262c7 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -41,3 +41,10 @@ cifmw_nolog: true # Vars for defaults which may change in the future cifmw_default_registry: "quay.io" + +# Default container namespace and tag values +cifmw_default_container_image_namespace: "podified-antelope-centos9" +cifmw_default_container_image_tag: "current-podified" + +# Alternative namespace for master builds +cifmw_master_container_image_namespace: "podified-master-centos9" diff --git a/hooks/playbooks/barbican-enable-luna.yml b/hooks/playbooks/barbican-enable-luna.yml index 31014a0294..c25ff1043a 100644 --- a/hooks/playbooks/barbican-enable-luna.yml +++ b/hooks/playbooks/barbican-enable-luna.yml @@ -14,10 +14,10 @@ tasks_from: create_image vars: barbican_src_image_registry: "{{ content_provider_registry_ip }}:5001" - barbican_src_image_namespace: "{{ cifmw_update_containers_org | default('podified-antelope-centos9') }}" + barbican_src_image_namespace: "{{ cifmw_update_containers_org | default(cifmw_default_container_image_namespace) }}" barbican_src_image_tag: "{{ cifmw_update_containers_tag | default('component-ci-testing') }}" barbican_dest_image_registry: "{{ content_provider_registry_ip }}:5001" - barbican_dest_image_namespace: "{{ cifmw_update_containers_org | default('podified-antelope-centos9') }}" + barbican_dest_image_namespace: "{{ cifmw_update_containers_org | default(cifmw_default_container_image_namespace) }}" barbican_dest_image_tag: "{{ cifmw_update_containers_barbican_custom_tag }}" image_registry_verify_tls: "{{ cifmw_image_registry_verify_tls | default('false', true) }}" luna_minclient_src: "{{ cifmw_hsm_luna_minclient_src }}" diff --git a/hooks/playbooks/barbican-prepare-proteccio.yml b/hooks/playbooks/barbican-prepare-proteccio.yml index 1ed2c7e6ee..11ae6e1bd8 100644 --- a/hooks/playbooks/barbican-prepare-proteccio.yml +++ b/hooks/playbooks/barbican-prepare-proteccio.yml @@ -48,12 +48,12 @@ barbican_src_api_image_name: "{{ cifmw_barbican_src_api_image_name }}" barbican_src_worker_image_name: "{{ cifmw_barbican_src_worker_image_name }}" barbican_src_image_registry: "{{ content_provider_registry_ip }}:5001" - barbican_src_image_namespace: "{{ cifmw_update_containers_org | default('podified-antelope-centos9') }}" + barbican_src_image_namespace: "{{ cifmw_update_containers_org | default(cifmw_default_container_image_namespace) }}" barbican_src_image_tag: "{{ cifmw_update_containers_tag | default('component-ci-testing') }}" barbican_dest_api_image_name: "{{ cifmw_barbican_dest_api_image_name }}" barbican_dest_worker_image_name: "{{ cifmw_barbican_dest_worker_image_name }}" barbican_dest_image_registry: "{{ content_provider_registry_ip }}:5001" - barbican_dest_image_namespace: "{{ cifmw_update_containers_org | default('podified-antelope-centos9') }}" + barbican_dest_image_namespace: "{{ cifmw_update_containers_org | default(cifmw_default_container_image_namespace) }}" barbican_dest_image_tag: "{{ cifmw_update_containers_barbican_custom_tag }}" image_registry_verify_tls: "{{ cifmw_image_registry_verify_tls | default('false', true) }}" proteccio_client_src: "{{ cifmw_hsm_proteccio_client_src }}" diff --git a/roles/build_containers/README.md b/roles/build_containers/README.md index 56cb592a3f..e2d83c7148 100644 --- a/roles/build_containers/README.md +++ b/roles/build_containers/README.md @@ -17,7 +17,7 @@ become - Required to install and execute tcib * `cifmw_build_containers_release`: (String) Distro release version. Default to `ansible_distribution_major_version`. * `cifmw_build_containers_openstack_release`: (String) Openstack release name. Default to `master`. * `cifmw_build_containers_dist_major_version`: (String) Distro major version. Default to `ansible_distribution_major_version`. -* `cifmw_build_containers_registry_namespace`: (String) Registry namespace in quay, docker or other registry service. Default to `podified-master-centos9`. +* `cifmw_build_containers_registry_namespace`: (String) Registry namespace in quay, docker or other registry service. Default to `{{ cifmw_master_container_image_namespace }}` (defined in group_vars/all.yml). * `cifmw_build_containers_push_registry`: (String) Container registry URL. Default to `localhost`. * `cifmw_build_containers_rhel_modules`: (String) A comma separated list of RHEL modules to enable with their version. Example: 'mariadb:10.3,virt:8.3'. * `cifmw_build_containers_exclude_containers`: (List) List of containers to match against the list of containers to be built to skip. Default to `[]`. @@ -28,7 +28,7 @@ become - Required to install and execute tcib * `cifmw_build_containers_volume_mounts:`: (List) Container bind mounts used when building the image. Default to `['/usr/share/tcib/container-images:/usr/share/tcib/container-images:z']`. * `cifmw_build_containers_extra_config`: (List) TCIB extra variables you want to pass. * `cifmw_build_containers_repo_dir`: (String) Define a custom directory containing the repo files. -* `cifmw_build_containers_image_tag`: (String) Image tag suffix. Default to `current-podified`. +* `cifmw_build_containers_image_tag`: (String) Image tag suffix. Default to `{{ cifmw_default_container_image_tag }}` (defined in group_vars/all.yml). * `cifmw_build_containers_containers_base_image`: (String) Base image name, with optional version. Can be 'centos:8', base name image will be 'centos' but 'centos:8' will be pulled to build the base image. Default to `centos:stream9`. * `cifmw_build_containers_hotfix_images`: (List) The fully qualified name of the container image. * `cifmw_build_containers_hotfix_rpms_paths`: (List) The full path to a directory where RPMs exist. diff --git a/roles/build_containers/defaults/main.yml b/roles/build_containers/defaults/main.yml index c631c2ea24..07e7f67571 100644 --- a/roles/build_containers/defaults/main.yml +++ b/roles/build_containers/defaults/main.yml @@ -29,7 +29,7 @@ cifmw_build_containers_distro: "{{ ansible_distribution | lower }}" cifmw_build_containers_release: "{{ ansible_distribution_major_version }}" cifmw_build_containers_openstack_release: master cifmw_build_containers_dist_major_version: "{{ ansible_distribution_major_version }}" -cifmw_build_containers_registry_namespace: podified-master-centos9 +cifmw_build_containers_registry_namespace: "{{ cifmw_master_container_image_namespace }}" cifmw_build_containers_push_registry: "{{ cifmw_default_registry }}" cifmw_build_containers_hotfix_images: [] cifmw_build_containers_hotfix_rpms_paths: [] @@ -38,7 +38,7 @@ cifmw_build_containers_run_hotfix: false cifmw_build_containers_volume_mounts: - "/usr/share/tcib/container-images:/usr/share/tcib/container-images:z" cifmw_build_containers_repo_dir: "{{ cifmw_build_containers_basedir }}/artifacts/repositories" -cifmw_build_containers_image_tag: current-podified +cifmw_build_containers_image_tag: "{{ cifmw_default_container_image_tag }}" cifmw_build_containers_containers_base_image: quay.io/centos/centos:stream9 cifmw_build_containers_cleanup: false cifmw_build_containers_tag_string: current diff --git a/roles/edpm_build_images/defaults/main.yml b/roles/edpm_build_images/defaults/main.yml index 87d158c6f2..9ef825552e 100644 --- a/roles/edpm_build_images/defaults/main.yml +++ b/roles/edpm_build_images/defaults/main.yml @@ -51,7 +51,7 @@ cifmw_edpm_build_images_dib_yum_repo_conf: >- cifmw_edpm_build_images_tag: 'latest' cifmw_edpm_build_images_dry_run: false cifmw_edpm_build_images_push_registry: 'quay.rdoproject.org' -cifmw_edpm_build_images_push_registry_namespace: 'podified-master-centos9' +cifmw_edpm_build_images_push_registry_namespace: "{{ cifmw_master_container_image_namespace }}" cifmw_edpm_build_images_push_container_images: false cifmw_edpm_build_images_cert_path: "/etc/pki/tls/certs/ca-bundle.crt" cifmw_edpm_build_images_cert_dest: "/etc/pki/ca-trust/source/anchors/edpm-build-images.crt" diff --git a/roles/repo_setup/defaults/main.yml b/roles/repo_setup/defaults/main.yml index 5929b16e41..6b55127048 100644 --- a/roles/repo_setup/defaults/main.yml +++ b/roles/repo_setup/defaults/main.yml @@ -21,7 +21,7 @@ # compute,glance,manila,network,octavia,security,swift,tempest,podified,ui,validation] cifmw_repo_setup_basedir: "{{ cifmw_basedir }}" cifmw_repo_setup_venv: "{{ cifmw_repo_setup_basedir }}/venv/repo-setup" -cifmw_repo_setup_promotion: "current-podified" +cifmw_repo_setup_promotion: "{{ cifmw_default_container_image_tag }}" cifmw_repo_setup_branch: "antelope" cifmw_repo_setup_dlrn_uri: "https://trunk.rdoproject.org/" cifmw_repo_setup_rdo_mirror: "{{ cifmw_repo_setup_dlrn_uri }}" diff --git a/roles/reproducer/templates/content-provider.yml.j2 b/roles/reproducer/templates/content-provider.yml.j2 index 713754959b..1b5af6230b 100644 --- a/roles/reproducer/templates/content-provider.yml.j2 +++ b/roles/reproducer/templates/content-provider.yml.j2 @@ -121,8 +121,8 @@ -e @./scenarios/centos-9/base.yml -e @./scenarios/centos-9/tcib.yml -e cifmw_zuul_target_host=controller-0 - -e "cifmw_build_containers_registry_namespace="{{ cifmw_update_containers_org | default('podified-antelope-centos9') }}"" - -e "cifmw_build_containers_image_tag="{{ cifmw_update_containers_tag | default('current-podified') }}"" + -e "cifmw_build_containers_registry_namespace="{{ cifmw_update_containers_org | default(cifmw_default_container_image_namespace) }}"" + -e "cifmw_build_containers_image_tag="{{ cifmw_update_containers_tag | default(cifmw_default_container_image_tag) }}"" -e "cifmw_rp_registry_ip="{{ hostvars['localhost']['cifmw_rp_registry_ip'] }}"" -e "@{{ ansible_user_dir }}/ci-framework-data/parameters/reproducer-variables.yml" -e "@~/{{ job_id }}-params/zuul-params.yml" diff --git a/roles/set_openstack_containers/README.md b/roles/set_openstack_containers/README.md index 40384e2632..ab50cba27b 100644 --- a/roles/set_openstack_containers/README.md +++ b/roles/set_openstack_containers/README.md @@ -10,8 +10,8 @@ The role will generate two 2 files in ~/ci-framework-data/artifacts/ directory a ## Parameters * `cifmw_set_openstack_containers_basedir`: Directory to store role generated contents. Defaults to `"{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"` * `cifmw_set_openstack_containers_registry`: Name of the container registry to pull containers from. Defaults to `quay.io` -* `cifmw_set_openstack_containers_namespace`: Name of the container namespace. Defaults to `podified-antelope-centos9` -* `cifmw_set_openstack_containers_tag`: Container tag. Defaults to `current-podified` +* `cifmw_set_openstack_containers_namespace`: Name of the container namespace. Defaults to `{{ cifmw_default_container_image_namespace }}` (defined in group_vars/all.yml) +* `cifmw_set_openstack_containers_tag`: Container tag. Defaults to `{{ cifmw_default_container_image_tag }}` (defined in group_vars/all.yml) * `cifmw_set_openstack_containers_tag_from_md5`: Get the tag from delorean.repo.md5. Defaults to `false`. * `cifmw_set_openstack_containers_dlrn_md5_path`: Full path of delorean.repo.md5. Defaults to `/etc/yum.repos.d/delorean.repo.md5`. * `cifmw_set_openstack_containers_overrides`: Extra container overrides. Defaults to `{}` diff --git a/roles/set_openstack_containers/defaults/main.yml b/roles/set_openstack_containers/defaults/main.yml index 45772fca67..e9e2490fb2 100644 --- a/roles/set_openstack_containers/defaults/main.yml +++ b/roles/set_openstack_containers/defaults/main.yml @@ -19,8 +19,8 @@ # All variables within this role should have a prefix of "cifmw_set_openstack_containers" cifmw_set_openstack_containers_basedir: "{{ cifmw_basedir }}" cifmw_set_openstack_containers_registry: "{{ cifmw_default_registry }}" -cifmw_set_openstack_containers_namespace: podified-antelope-centos9 -cifmw_set_openstack_containers_tag: current-podified +cifmw_set_openstack_containers_namespace: "{{ cifmw_default_container_image_namespace }}" +cifmw_set_openstack_containers_tag: "{{ cifmw_default_container_image_tag }}" cifmw_set_openstack_containers_prefix: openstack cifmw_set_openstack_containers_prefix_filter: "{{ cifmw_set_openstack_containers_prefix }}" cifmw_set_openstack_containers_operator_name: openstack diff --git a/roles/tempest/README.md b/roles/tempest/README.md index 0cf8618ff7..da7de6a427 100644 --- a/roles/tempest/README.md +++ b/roles/tempest/README.md @@ -10,10 +10,10 @@ become - Required to install required rpm packages * `cifmw_tempest_default_groups`: (List) List of groups in the include list to search for tests to be executed * `cifmw_tempest_default_jobs`: (List) List of jobs in the exclude list to search for tests to be excluded * `cifmw_tempest_registry`: (String) The registry where to pull tempest container. Default to `quay.io` -* `cifmw_tempest_namespace`: (String) Registry's namespace where to pull tempest container. Default to `podified-antelope-centos9` +* `cifmw_tempest_namespace`: (String) Registry's namespace where to pull tempest container. Default to `{{ cifmw_default_container_image_namespace }}` (defined in group_vars/all.yml) * `cifmw_tempest_container`: (String) Name of the tempest container. Default to `openstack-tempest` * `cifmw_tempest_image`: (String) Tempest image to be used. Default to `{{ cifmw_tempest_registry }}/{{ cifmw_tempest_namespace }}/{{ cifmw_tempest_container }}` -* `cifmw_tempest_image_tag`: (String) Tag for the `cifmw_tempest_image`. Default to `current-podified` +* `cifmw_tempest_image_tag`: (String) Tag for the `cifmw_tempest_image`. Default to `{{ cifmw_default_container_image_tag }}` (defined in group_vars/all.yml) * `cifmw_tempest_dry_run`: (Boolean) Whether tempest should run or not. Default to `false` * `cifmw_tempest_remove_container`: (Boolean) Cleanup tempest container after it is done. Default to `false` * `cifmw_tempest_tests_skipped`: (List) List of tests to be skipped. Setting this will not use the `list_skipped` plugin diff --git a/roles/tempest/defaults/main.yml b/roles/tempest/defaults/main.yml index e0b93be22c..f63857af67 100644 --- a/roles/tempest/defaults/main.yml +++ b/roles/tempest/defaults/main.yml @@ -23,10 +23,10 @@ cifmw_tempest_default_groups: cifmw_tempest_default_jobs: - default cifmw_tempest_registry: "{{ cifmw_default_registry }}" -cifmw_tempest_namespace: podified-antelope-centos9 +cifmw_tempest_namespace: "{{ cifmw_default_container_image_namespace }}" cifmw_tempest_container: openstack-tempest cifmw_tempest_image: "{{ cifmw_tempest_registry }}/{{ cifmw_tempest_namespace }}/{{ cifmw_tempest_container }}" -cifmw_tempest_image_tag: current-podified +cifmw_tempest_image_tag: "{{ cifmw_default_container_image_tag }}" cifmw_tempest_dry_run: false cifmw_tempest_remove_container: true cifmw_tempest_concurrency: 4 diff --git a/roles/test_operator/defaults/main.yml b/roles/test_operator/defaults/main.yml index 444ed19bc5..08d131d0dc 100644 --- a/roles/test_operator/defaults/main.yml +++ b/roles/test_operator/defaults/main.yml @@ -61,8 +61,8 @@ cifmw_test_operator_log_pod_definition: nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}" # default test framework registry, namespace and tag can be overridden per test framework (tempest, tobiko, horizontest and ansibletest) cifmw_test_operator_default_registry: "{{ cifmw_default_registry }}" -cifmw_test_operator_default_namespace: podified-antelope-centos9 -cifmw_test_operator_default_image_tag: current-podified +cifmw_test_operator_default_namespace: "{{ cifmw_default_container_image_namespace }}" +cifmw_test_operator_default_image_tag: "{{ cifmw_default_container_image_tag }}" # Section 2: tempest parameters - used when run_test_fw is 'tempest' cifmw_test_operator_tempest_name: "tempest-tests" diff --git a/roles/update/defaults/main.yml b/roles/update/defaults/main.yml index c3b497587d..9e17f48586 100644 --- a/roles/update/defaults/main.yml +++ b/roles/update/defaults/main.yml @@ -20,8 +20,8 @@ cifmw_update_openstack_update_run_target_version: "0.0.2" cifmw_update_openstack_update_run_operators_updated: true -cifmw_update_openstack_update_run_containers_namespace: "podified-antelope-centos9" -cifmw_update_openstack_update_run_containers_target_tag: "current-podified" +cifmw_update_openstack_update_run_containers_namespace: "{{ cifmw_default_container_image_namespace }}" +cifmw_update_openstack_update_run_containers_target_tag: "{{ cifmw_default_container_image_tag }}" cifmw_update_openstack_update_run_timeout: "600s" # Update variant. Can be 'monolithic' or 'split'. diff --git a/roles/update_containers/README.md b/roles/update_containers/README.md index 20d175e9da..c5192a494c 100644 --- a/roles/update_containers/README.md +++ b/roles/update_containers/README.md @@ -14,8 +14,8 @@ If apply, please explain the privilege escalation done in this role. * `cifmw_update_containers_dest_path`: The destination file path to create update containers CR file. * `cifmw_update_containers_registry`: The container registry to pull containers from. Default to "quay.io". * `cifmw_update_containers_name_prefix`: The container name prefix. Default to "openstack". -* `cifmw_update_containers_org`: The container registry namespace to pull container from. Default to `podified-antelope-centos9` -* `cifmw_update_containers_tag`: The container tag. Default to "current-podified". +* `cifmw_update_containers_org`: The container registry namespace to pull container from. Default to `{{ cifmw_default_container_image_namespace }}` (defined in group_vars/all.yml) +* `cifmw_update_containers_tag`: The container tag. Default to `{{ cifmw_default_container_image_tag }}` (defined in group_vars/all.yml). * `cifmw_update_containers_cindervolumes`: The names of the cinder volumes prefix. Default to `[]`. * `cifmw_update_containers_cindervolumes_extra`: Additional cinder volumes containers, meaning names and container URIs. Default to `{}`. * `cifmw_update_containers_manilashares`: The names of the manila shares prefix. Default to `[]`. diff --git a/roles/update_containers/defaults/main.yml b/roles/update_containers/defaults/main.yml index 940e7c8017..711530b2b0 100644 --- a/roles/update_containers/defaults/main.yml +++ b/roles/update_containers/defaults/main.yml @@ -32,8 +32,8 @@ cifmw_update_containers_dest_path: >- }} cifmw_update_containers_registry: "{{ cifmw_default_registry }}" -cifmw_update_containers_org: "podified-antelope-centos9" -cifmw_update_containers_tag: "current-podified" +cifmw_update_containers_org: "{{ cifmw_default_container_image_namespace }}" +cifmw_update_containers_tag: "{{ cifmw_default_container_image_tag }}" cifmw_update_containers_name_prefix: "openstack" cifmw_update_containers_openstack: false cifmw_update_containers_rollback: false diff --git a/roles/validations/defaults/main.yml b/roles/validations/defaults/main.yml index acf6bde0b8..91e6e68b1c 100644 --- a/roles/validations/defaults/main.yml +++ b/roles/validations/defaults/main.yml @@ -44,7 +44,7 @@ cifmw_validations_basedir: "{{ cifmw_basedir }}" cifmw_validations_namespace: "openstack" -cifmw_validations_hotfixed_edpm_nova_compute_image: quay.io/podified-antelope-centos9/openstack-nova-compute:current-podified +cifmw_validations_hotfixed_edpm_nova_compute_image: "{{ cifmw_default_registry }}/{{ cifmw_default_container_image_namespace }}/openstack-nova-compute:{{ cifmw_default_container_image_tag }}" cifmw_validations_custom_nova_service: "nova-custom-ceph" cifmw_validations_xml_status_file_dir: "{{ cifmw_validations_basedir }}/tests/validations" diff --git a/scenarios/centos-9/edpm_periodic.yml b/scenarios/centos-9/edpm_periodic.yml index c843c07c18..60141831d4 100644 --- a/scenarios/centos-9/edpm_periodic.yml +++ b/scenarios/centos-9/edpm_periodic.yml @@ -2,7 +2,7 @@ cifmw_repo_setup_branch: master cifmw_repo_setup_promotion: podified-ci-testing cifmw_update_containers_registry: quay.rdoproject.org -cifmw_update_containers_org: "podified-master-centos9" +cifmw_update_containers_org: "{{ cifmw_master_container_image_namespace }}" cifmw_update_containers_tag: "{{ cifmw_repo_setup_full_hash }}" cifmw_update_containers_openstack: true cifmw_run_tests: true diff --git a/scenarios/centos-9/meta_content_provider.yml b/scenarios/centos-9/meta_content_provider.yml index 0ebeba1ca9..20e488b945 100644 --- a/scenarios/centos-9/meta_content_provider.yml +++ b/scenarios/centos-9/meta_content_provider.yml @@ -14,7 +14,7 @@ cifmw_build_containers_repo_dir: "{{ cifmw_basedir }}/artifacts/repositories" cifmw_build_containers_push_registry: "{{ cifmw_rp_registry_ip }}:{{ cifmw_rp_registry_port }}" cifmw_build_containers_push_containers: false cifmw_build_containers_buildah_push: true -cifmw_build_containers_registry_namespace: podified-antelope-centos9 +cifmw_build_containers_registry_namespace: "{{ cifmw_default_container_image_namespace }}" cifmw_build_containers_image_tag: "{{ cifmw_repo_setup_full_hash }}" # edpm_build_images vars