Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 31 additions & 6 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,39 @@ cifmw_default_dns_servers:
- "1.1.1.1"
- "8.8.8.8"

# group_vars related to github repo URLs
cifmw_openstack_k8s_operators_org_url: "https://github.com/openstack-k8s-operators"
cifmw_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/ci-framework"
cifmw_installyamls_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/install_yamls"
cifmw_architecture_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/architecture"

# set to false to enable logging of sensitive data
cifmw_nolog: true

# Vars for defaults which may change in the future
cifmw_default_registry: "quay.io"

cifmw_openstack_k8s_operators_org_url: "https://github.com/openstack-k8s-operators"

#### Pinned external projects dependencies ####
#
# These variables define the source URL and version for
# projects that ci-framework can either receive from Zuul (as a
# required-project checkout) or clone on its own when running
# outside Zuul or when the projects are not listed in required-projects.
#
# Roles reference these variables directly in their tasks.
# Jobs can override any of them via vars or extra-vars.

# Might be interesting extracting them in a new group_vars/all folder,
# this require renaming this file to main.yml taking care of regressions

# ci-framework
cifmw_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/ci-framework"
cifmw_repo_version: "HEAD"

# repo-setup
cifmw_repo_setup_src: "{{ cifmw_openstack_k8s_operators_org_url }}/repo-setup"
cifmw_repo_setup_version: "HEAD"

# install_yamls
cifmw_installyamls_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/install_yamls"
cifmw_install_yamls_version: "HEAD"

# architecture
cifmw_architecture_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/architecture"
cifmw_kustomize_deploy_architecture_repo_version: "HEAD"
4 changes: 3 additions & 1 deletion roles/reproducer/tasks/default_repositories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
ansible.builtin.stat:
path: "{{ repository.dest }}"

# It seems override-checkout is not set anywhere. Not related with its value
# in zuul jobs
- name: "Clone repository if needed: {{ repository.src | basename}}"
when:
- not _repo_clone.stat.exists
ansible.builtin.git: # noqa: latest[git]
dest: "{{ repository.dest }}"
repo: "{{ repository.src }}"
version: "{{ repository['override-checkout'] | default(omit) }}"
version: "{{ repository['override-checkout'] | default(repository.version | default(omit)) }}"
16 changes: 15 additions & 1 deletion roles/reproducer/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
---
# Default repositories we always want to have
# Versions are set at group_vars/all.yml
# TODO(evallesp): We're setting pull capabilities directly from roles that are required.
# We might eventually think how to simplify reproducer and let each of the roles to clone
# repositories. Might be also a good option to use an ansible role for pulling them
# in the desired moment by cloning it.
#
# Precedence chain:
# * Zuul repos
# * cifmw_reproducer_repositories
# * cifmw_reproducer_default_repositories
# * Git pull logic in each of the roles

cifmw_reproducer_default_repositories:
- src: "{{ cifmw_repo_url }}"
dest: "{{ cifmw_reproducer_controller_user_dir }}/{{ cifmw_repo_relative }}"
version: "{{ cifmw_repo_version }}"
- src: "{{ cifmw_installyamls_repo_url }}"
dest: "{{ cifmw_reproducer_controller_user_dir }}/{{ cifmw_installyamls_repos_relative }}"
version: "{{ cifmw_install_yamls_version }}"
- src: "{{ cifmw_architecture_repo_url }}"
dest: "{{ cifmw_reproducer_controller_user_dir }}/{{ cifmw_architecture_repo_relative }}"
version: "{{ cifmw_kustomize_deploy_architecture_repo_version }}"

# one place to rule them all
cifmw_reproducer_nm_dnsmasq: "/etc/NetworkManager/conf.d/zz-dnsmasq.conf"
Expand Down
Loading