Allow changing 'update' and 'force' when cloning repos

Change-Id: I0079deb31a4268fd75c323aff3c4778c7d170053
This commit is contained in:
Dmitry Tantsur 2020-06-14 22:30:44 +02:00
parent 7fa9f665c3
commit a78e64b3d1
5 changed files with 19 additions and 4 deletions

View File

@ -47,6 +47,8 @@ reqs_git_url: https://opendev.org/openstack/requirements
reqs_git_folder: "{{ git_root }}/requirements"
reqs_git_branch: "{{ git_branch }}"
upper_constraints_file: "{{ lookup('env', 'UPPER_CONSTRAINTS_FILE') | default(reqs_git_folder + '/upper-constraints.txt', True) }}"
update_repos: true
force_update_repos: true
# Conditional variables utilized based on CI or manual testing options.
copy_from_local_path: false

View File

@ -106,10 +106,10 @@
- name: download requirements via git
git:
dest: "{{ reqs_git_folder }}"
force: yes
force: "{{ force_update_repos | bool }}"
repo: "{{ reqs_git_url }}"
version: "{{ reqs_git_branch }}"
update: yes
update: "{{ update_repos | bool }}"
clone: yes
when: ci_testing_zuul | bool == false and copy_from_local_path | bool == false

View File

@ -46,6 +46,9 @@ sushy_git_branch: "{{ git_branch }}"
ipa_git_branch: "{{ git_branch }}"
ipa_builder_git_branch: master
update_repos: true
force_update_repos: true
# Conditional variables utilized based on CI or manual testing options.
copy_from_local_path: false
ci_testing_zuul: false

View File

@ -24,10 +24,10 @@
- name: "Download via GIT"
git:
dest: "{{ item.git_folder }}"
force: yes
force: "{{ force_update_repos | bool }}"
repo: "{{ item.git_url }}"
version: "{{ item.git_branch }}"
update: yes
update: "{{ update_repos | bool }}"
clone: yes
with_items: "{{ bifrost_install_sources }}"
when: ci_testing_zuul | bool == false and copy_from_local_path | bool == false

View File

@ -0,0 +1,10 @@
---
features:
- |
Adds two new parameters for controlling how existing git checkouts are
handled:
* ``update_repos`` can be set to ``false`` to prevent the repositories
from being updated.
* ``force_update_repos`` can be set to ``false`` to prevent Bifrost from
overwriting local changes.