Skip to content

Commit 96502c6

Browse files
committed
[reproducer] Added dependencies urls and versions
This file in conjuction with: * openstack-k8s-operators#3774 * openstack-k8s-operators#3772 Allows ci-framework to clone those repos (architecture was already enabled) when repositories are not already there due to zuul has not marked them as required-projects or because we're running them outside the zuul ecosystem. This is the almost the lowest in precedence, so if we still have these vars defined at zuul level or defaults-vars (passed as extra-vars) or scenarios files, this file is not taken into consideration. Precedence chain: * Zuul repos * cifmw_reproducer_repositories * cifmw_reproducer_default_repositories * Git pull logic in each of the roles Signed-off-by: Enrique Vallespi Gil <evallesp@redhat.com>
1 parent 7680a88 commit 96502c6

File tree

3 files changed

+49
-8
lines changed

3 files changed

+49
-8
lines changed

group_vars/all.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,39 @@ cifmw_default_dns_servers:
3030
- "1.1.1.1"
3131
- "8.8.8.8"
3232

33-
# group_vars related to github repo URLs
34-
cifmw_openstack_k8s_operators_org_url: "https://github.com/openstack-k8s-operators"
35-
cifmw_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/ci-framework"
36-
cifmw_installyamls_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/install_yamls"
37-
cifmw_architecture_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/architecture"
38-
3933
# set to false to enable logging of sensitive data
4034
cifmw_nolog: true
4135

4236
# Vars for defaults which may change in the future
4337
cifmw_default_registry: "quay.io"
38+
39+
cifmw_openstack_k8s_operators_org_url: "https://github.com/openstack-k8s-operators"
40+
41+
#### Pinned external projects dependencies ####
42+
#
43+
# These variables define the source URL and version for
44+
# projects that ci-framework can either receive from Zuul (as a
45+
# required-project checkout) or clone on its own when running
46+
# outside Zuul or when the projects are not listed in required-projects.
47+
#
48+
# Roles reference these variables directly in their tasks.
49+
# Jobs can override any of them via vars or extra-vars.
50+
51+
# Might be interesting extracting them in a new group_vars/all folder,
52+
# this require renaming this file to main.yml taking care of regressions
53+
54+
# ci-framework
55+
cifmw_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/ci-framework"
56+
cifmw_repo_version: "HEAD"
57+
58+
# repo-setup
59+
cifmw_repo_setup_src: "{{ cifmw_openstack_k8s_operators_org_url }}/repo-setup"
60+
cifmw_repo_setup_version: "HEAD"
61+
62+
# install_yamls
63+
cifmw_installyamls_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/install_yamls"
64+
cifmw_install_yamls_version: "HEAD"
65+
66+
# architecture
67+
cifmw_architecture_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/architecture"
68+
cifmw_kustomize_deploy_architecture_repo_version: "HEAD"

roles/reproducer/tasks/default_repositories.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
ansible.builtin.stat:
88
path: "{{ repository.dest }}"
99

10+
# It seems override-checkout is not set anywhere. Not related with its value
11+
# in zuul jobs
1012
- name: "Clone repository if needed: {{ repository.src | basename}}"
1113
when:
1214
- not _repo_clone.stat.exists
1315
ansible.builtin.git: # noqa: latest[git]
1416
dest: "{{ repository.dest }}"
1517
repo: "{{ repository.src }}"
16-
version: "{{ repository['override-checkout'] | default(omit) }}"
18+
version: "{{ repository['override-checkout'] | default(repository.version | default(omit)) }}"

roles/reproducer/vars/main.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
---
2-
# Default repositories we always want to have
2+
# Versions are set at group_vars/all.yml
3+
# TODO(evallesp): We're setting pull capabilities directly from roles that are required.
4+
# We might eventually think how to simplify reproducer and let each of the roles to clone
5+
# repositories. Might be also a good option to use an ansible role for pulling them
6+
# in the desired moment by cloning it.
7+
#
8+
# Precedence chain:
9+
# * Zuul repos
10+
# * cifmw_reproducer_repositories
11+
# * cifmw_reproducer_default_repositories
12+
# * Git pull logic in each of the roles
13+
314
cifmw_reproducer_default_repositories:
415
- src: "{{ cifmw_repo_url }}"
516
dest: "{{ cifmw_reproducer_controller_user_dir }}/{{ cifmw_repo_relative }}"
17+
version: "{{ cifmw_repo_version }}"
618
- src: "{{ cifmw_installyamls_repo_url }}"
719
dest: "{{ cifmw_reproducer_controller_user_dir }}/{{ cifmw_installyamls_repos_relative }}"
20+
version: "{{ cifmw_install_yamls_version }}"
821
- src: "{{ cifmw_architecture_repo_url }}"
922
dest: "{{ cifmw_reproducer_controller_user_dir }}/{{ cifmw_architecture_repo_relative }}"
23+
version: "{{ cifmw_kustomize_deploy_architecture_repo_version }}"
1024

1125
# one place to rule them all
1226
cifmw_reproducer_nm_dnsmasq: "/etc/NetworkManager/conf.d/zz-dnsmasq.conf"

0 commit comments

Comments
 (0)