Skip to content

Commit 9708c56

Browse files
evallespopenshift-merge-bot[bot]
authored andcommitted
[reproducer] Added dependencies urls and versions
This file in conjuction with: * #3774 * #3772 * #3792 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 4a2c9ed commit 9708c56

3 files changed

Lines changed: 46 additions & 8 deletions

File tree

group_vars/all.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ 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

@@ -48,3 +42,31 @@ cifmw_default_container_image_tag: "current-podified"
4842

4943
# Alternative namespace for master builds
5044
cifmw_master_container_image_namespace: "podified-master-centos9"
45+
cifmw_openstack_k8s_operators_org_url: "https://github.com/openstack-k8s-operators"
46+
47+
#### Pinned external projects dependencies ####
48+
#
49+
# These variables define the source URL and version for
50+
# projects that ci-framework can either receive from Zuul (as a
51+
# required-project checkout) or clone on its own when running
52+
# outside Zuul or when the projects are not listed in required-projects.
53+
#
54+
# Roles reference these variables directly in their tasks.
55+
# Jobs can override any of them via vars or extra-vars.
56+
57+
# ci-framework
58+
cifmw_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/ci-framework"
59+
cifmw_repo_version_pin: "HEAD"
60+
61+
# repo-setup
62+
cifmw_repo_setup_src: "{{ cifmw_openstack_k8s_operators_org_url }}/repo-setup"
63+
cifmw_repo_setup_version_pin: "HEAD"
64+
65+
# install_yamls
66+
# TODO, eventually we should rename cifmw_installyamls* to cifmw_install_yamls* vars
67+
cifmw_installyamls_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/install_yamls"
68+
cifmw_install_yamls_version_pin: "HEAD"
69+
70+
# architecture
71+
cifmw_architecture_repo_url: "{{ cifmw_openstack_k8s_operators_org_url }}/architecture"
72+
cifmw_architecture_repo_version_pin: "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_pin }}"
618
- src: "{{ cifmw_installyamls_repo_url }}"
719
dest: "{{ cifmw_reproducer_controller_user_dir }}/{{ cifmw_installyamls_repos_relative }}"
20+
version: "{{ cifmw_install_yamls_version_pin }}"
821
- src: "{{ cifmw_architecture_repo_url }}"
922
dest: "{{ cifmw_reproducer_controller_user_dir }}/{{ cifmw_architecture_repo_relative }}"
23+
version: "{{ cifmw_architecture_repo_version_pin }}"
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)