Merge "Do not clone repositories that are not used"

This commit is contained in:
Zuul 2022-02-10 17:18:02 +00:00 committed by Gerrit Code Review
commit 87a2fdcc56
3 changed files with 19 additions and 3 deletions

View File

@ -53,8 +53,10 @@ ironicinspectorclient_source_install: false
sushy_source_install: false
staging_drivers_source_install: true
prometheus_exporter_source_install: true
enable_inspector: true
enable_keystone: false
enable_prometheus_exporter: false
staging_drivers_include: false
update_repos: true
force_update_repos: true
@ -86,11 +88,13 @@ bifrost_install_sources:
git_branch: "{{ ironicinspector_git_branch }}"
name: ironicinspector
source_install: "{{ ironicinspector_source_install }}"
enabled: "{{ enable_inspector }}"
- git_folder: "{{ ironicinspectorclient_git_folder }}"
git_url: "{{ ironicinspectorclient_git_url }}"
git_branch: "{{ ironicinspectorclient_git_branch }}"
name: ironicinspectorclient
source_install: "{{ ironicinspectorclient_source_install }}"
enabled: "{{ enable_inspector }}"
- git_folder: "{{ reqs_git_folder }}"
git_url: "{{ reqs_git_url }}"
git_branch: "{{ reqs_git_branch }}"
@ -100,12 +104,12 @@ bifrost_install_sources:
git_branch: "{{ staging_drivers_git_branch }}"
name: ironic-staging-drivers
source_install: "{{ staging_drivers_source_install }}"
enabled: "{{ staging_drivers_include }}"
- git_folder: "{{ keystone_git_folder }}"
git_url: "{{ keystone_git_url }}"
git_branch: "{{ keystone_git_branch }}"
name: keystone
# NOTE(dtantsur): skip cloning if keystone is disabled
source_install: "{{ enable_keystone }}"
enabled: "{{ enable_keystone }}"
- git_folder: "{{ sushy_git_folder }}"
git_url: "{{ sushy_git_url }}"
git_branch: "{{ sushy_git_branch }}"
@ -123,7 +127,8 @@ bifrost_install_sources:
git_url: "{{ prometheus_exporter_git_url }}"
git_branch: "{{ prometheus_exporter_git_branch }}"
name: ironic-prometheus-exporter
source_install: "{{ enable_prometheus_exporter }}"
source_install: "{{ prometheus_exporter_source_install }}"
enabled: "{{ enable_prometheus_exporter }}"
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"

View File

@ -33,6 +33,7 @@
when:
- not copy_from_local_path | bool
- item.source_install | default(true) | bool
- item.enabled | default(true) | bool
- name: "Ensure ownership of repositories"
file:
@ -44,6 +45,7 @@
when:
- not copy_from_local_path | bool
- item.source_install | default(true) | bool
- item.enabled | default(true) | bool
- name: "Purge existing path when copying"
file:
@ -53,6 +55,7 @@
when:
- copy_from_local_path | bool
- item.source_install | default(true) | bool
- item.enabled | default(true) | bool
- update_repos | bool
- name: "Copy from local path"
@ -67,3 +70,4 @@
when:
- copy_from_local_path | bool
- item.source_install | default(true) | bool
- item.enabled | default(true) | bool

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Ironic Prometheus Exporter, Ironic Inspector, Staging Drivers and Keystone
are no longer cloned if they are not enabled.
- |
Actually respects the ``prometheus_exporter_source_install`` variable.