Skip to content
Draft
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
2 changes: 1 addition & 1 deletion create-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@

- name: Set permissions on /home/zuul/ci-framework-data on controller-0
ansible.builtin.file:
path: "{{ cifmw_basedir | default('/home/zuul/ci-framework-data') }}"
path: "{{ cifmw_basedir }}"
state: directory
recurse: true
owner: "{{ ansible_user_id }}"
Expand Down
3 changes: 2 additions & 1 deletion group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
# This file contains all repeating variables, that can be set
# globaly instead of parse Zuul inventory file to get proper value.
# globally instead of parse Zuul inventory file to get proper value.
#### GLOBAL VARS ####
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
cifmw_project_dir: src/github.com/openstack-k8s-operators/ci-framework
cifmw_project_dir_absolute: "{{ ansible_user_dir }}/{{ cifmw_project_dir }}"
cifmw_installyamls_repos_relative: src/github.com/openstack-k8s-operators/install_yamls
# since cifmw_installyamls_repos var already exists, let's use that and move all definition here in single place instead of creating another variable.
cifmw_installyamls_repos: "{{ ansible_user_dir }}/{{ cifmw_installyamls_repos_relative }}"
cifmw_basedir: "{{ ansible_user_dir }}/ci-framework-data"
2 changes: 1 addition & 1 deletion playbooks/01-bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@
- always
ansible.builtin.copy:
mode: "0644"
dest: "{{ cifmw_basedir|default(ansible_user_dir ~ '/ci-framework-data') }}/artifacts/parameters/custom-params.yml"
dest: "{{ cifmw_basedir }}/artifacts/parameters/custom-params.yml"
content: "{{ ci_framework_params | to_nice_yaml }}"
4 changes: 2 additions & 2 deletions playbooks/99-logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
logfiles_dest_dir: >-
{{
(
cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data'),
cifmw_basedir,
'logs/',
now(fmt='%Y-%m-%d_%H-%M')
) | path_join
Expand Down Expand Up @@ -104,7 +104,7 @@
dest: >-
{{
(
cifmw_basedir|default(ansible_user_dir ~ '/ci-framework-data'),
cifmw_basedir,
"artifacts/ansible_facts." + now(fmt='%Y-%m-%d_%H-%M')
) | path_join
}}
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/generate_make_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
until: "{{ make_%(target)s_until | default(true) }}"
register: "make_%(target)s_status"
cifmw.general.ci_script:
output_dir: "{{ cifmw_basedir|default(ansible_user_dir ~ '/ci-framework-data') }}/artifacts"
output_dir: "{{ cifmw_basedir }}/artifacts"
chdir: "%(chdir)s"
script: "make %(target)s"
dry_run: "{{ make_%(target)s_dryrun|default(false)|bool }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/artifacts/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# All variables intended for modification should be placed in this file.
# All variables within this role should have a prefix of "cifmw_artifacts"
cifmw_artifacts_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
cifmw_artifacts_basedir: "{{ cifmw_basedir }}"
cifmw_artifacts_crc_host: "api.crc.testing"
cifmw_artifacts_crc_user: "core"
cifmw_artifacts_crc_sshkey: "~/.crc/machines/crc/id_ecdsa"
Expand Down
2 changes: 1 addition & 1 deletion roles/build_containers/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# All variables intended for modification should be placed in this file.
# All variables within this role should have a prefix of "cifmw_build_containers"
cifmw_build_containers_tcib_src: "https://github.com/openstack-k8s-operators/tcib"
cifmw_build_containers_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
cifmw_build_containers_basedir: "{{ cifmw_basedir }}"
cifmw_build_containers_authfile_path: ${XDG_RUNTIME_DIR}/containers/auth.json
cifmw_build_containers_push_containers: false
cifmw_build_containers_timestamper_cmd: >-
Expand Down
3 changes: 0 additions & 3 deletions roles/build_containers/molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

- name: Prepare
hosts: all
vars:
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
cifmw_basedir: "{{ ansible_user_dir }}/ci-framework-data/"
roles:
- role: test_deps
- role: repo_setup
2 changes: 1 addition & 1 deletion roles/build_openstack_packages/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cifmw_bop_dlrn_deps:
- sqlite
- python3-libselinux

cifmw_bop_build_repo_dir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}/logs"
cifmw_bop_build_repo_dir: "{{ cifmw_basedir }}/logs"
cifmw_bop_artifacts_basedir: "{{ ansible_user_dir ~ '/ci-framework-data' }}"
cifmw_bop_dlrn_repo_url: "https://github.com/openstack-packages/DLRN.git"
cifmw_bop_dlrn_from_source: false
Expand Down
2 changes: 1 addition & 1 deletion roles/build_push_container/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# All variables within this role should have a prefix of "cifmw_build_push_container"

# Meta vars
cifmw_build_push_container_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
cifmw_build_push_container_basedir: "{{ cifmw_basedir }}"
cifmw_build_push_container_artifacts: "{{ (cifmw_build_push_container_basedir, 'artifacts', 'build_push_container')| ansible.builtin.path_join }}"

# Build vars
Expand Down
2 changes: 1 addition & 1 deletion roles/cert_manager/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# All variables intended for modification should be placed in this file.
# All variables within this role should have a prefix of "cifmw_cert_manager"

cifmw_cert_manager_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
cifmw_cert_manager_basedir: "{{ cifmw_basedir }}"
cifmw_cert_manager_manifests_dir: "{{ cifmw_manifests | default(cifmw_cert_manager_basedir ~ '/artifacts/manifests') }}/cert-manager"
cifmw_cert_manager_operator_namespace: cert-manager-operator
cifmw_cert_manager_openshift_version: stable-v1
Expand Down
5 changes: 1 addition & 4 deletions roles/ci_gen_kustomize_values/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
# Top-level parameter shared with deploy_kustomize role
cifmw_architecture_scenario: null

cifmw_ci_gen_kustomize_values_basedir: >-
{{
cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data')
}}
cifmw_ci_gen_kustomize_values_basedir: "{{ cifmw_basedir }}"

cifmw_ci_gen_kustomize_values_architecture_repo: >-
{{
Expand Down
2 changes: 1 addition & 1 deletion roles/ci_local_storage/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# All variables intended for modification should be placed in this file.
# All variables within this role should have a prefix of "cifmw_cls"

cifmw_cls_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
cifmw_cls_basedir: "{{ cifmw_basedir }}"
cifmw_cls_manifests_dir: "{{ cifmw_manifests | default(cifmw_cls_basedir ~ '/artifacts/manifests') }}/storage"
cifmw_cls_storage_class: local-storage
cifmw_cls_storage_capacity: 10Gi
Expand Down
2 changes: 1 addition & 1 deletion roles/ci_lvms_storage/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
cifmw_lvms_disk_list: []
cifmw_lvms_cluster_name: lvmcluster
cifmw_lvms_namespace: openshift-lvm-storage
cifmw_lvms_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
cifmw_lvms_basedir: "{{ cifmw_basedir }}"
cifmw_lvms_manifests_dir: "{{ cifmw_manifests | default(cifmw_lvms_basedir ~ '/artifacts/manifests') }}/lvms"
# The "lvms-" prefix is prepended to the cifmw_lvms_storage_class by the lvm-operator
cifmw_lvms_storage_class: local-storage
Expand Down
2 changes: 1 addition & 1 deletion roles/ci_multus/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# All variables intended for modification should be placed in this file.
# All variables within this role should have a prefix of "cifmw_ci_multus"

cifmw_ci_multus_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
cifmw_ci_multus_basedir: "{{ cifmw_basedir }}"
cifmw_ci_multus_manifests_dir: "{{ cifmw_manifests | default(cifmw_ci_multus_basedir ~ '/artifacts/manifests') }}/ci_multus"
cifmw_ci_multus_namespace: "openstack"
cifmw_ci_multus_ocp_hostname: "crc"
Expand Down
2 changes: 1 addition & 1 deletion roles/ci_nmstate/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# All variables intended for modification should be placed in this file.
# All variables within this role should have a prefix of "cifmw_ci_nmstate"
cifmw_ci_nmstate_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
cifmw_ci_nmstate_basedir: "{{ cifmw_basedir }}"
cifmw_ci_nmstate_manifests_dir: "{{ cifmw_manifests | default(cifmw_ci_nmstate_basedir ~ '/artifacts/manifests') }}/nmstate"
cifmw_ci_nmstate_configs_dir: "{{ cifmw_ci_nmstate_basedir }}/artifacts/nmstate"
cifmw_ci_nmstate_namespace: openshift-nmstate
Expand Down
Loading